Re: The go server changes the time zone, and the react client reports an error

35 views
Skip to first unread message
Message has been deleted

Gene

unread,
May 20, 2022, 12:18:50 PM5/20/22
to Tinode General
The client expects time to be a string between 20 and 24 chars:

You send the time in local time zone, which is longer than 24 chars, like "2022-05-20T10:00:00-05:00"

There is absolutely no reason to send time in local time zone. The time zone should be handled by the client.

On Thursday, May 19, 2022 at 11:55:27 PM UTC-7 Nadeem Smith wrote:
I am in china so 

Change time.Now().UTC().Round(time.Millisecond)  to  time.Now().Round(time.Millisecond)

and change dsn to  “root:123456@tcp(localhost)/tinode?parseTime=true&loc=Local“

But  the react js  reports an error :

TypeError: e.getFullYear is not a function
    at A (strformat.js:5:12)
    at j.render (received-marker.jsx:32:19)
    at Te (react-dom.production.min.js:119:308)
    at Ch (react-dom.production.min.js:119:105)
    at Pj (react-dom.production.min.js:233:139)
    at di (react-dom.production.min.js:168:305)
    at Nj (react-dom.production.min.js:168:236)
    at sc (react-dom.production.min.js:168:96)
    at gf (react-dom.production.min.js:162:109)
    at react-dom.production.min.js:73:230


Reply all
Reply to author
Forward
0 new messages