Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Bad date in PostgreSQL column ReceivingDateTime in 1.40.0 #447
After upgrading to 1.40.0, timestamps in inbox table, column ReceivingDateTime, went wrong. I have found that this is caused by patch #305 . At least for me, this patch is not working OK.
I have reviewed sources and I have found:
Originaly, there was gmtime() function used to convert timestamp to GMT, and then it was formatted for Postgres with GMT suffix.
Currently, there is locattime() used, which returns time in local format. This time is written to Postgresql with "GMT" suffix too, which is bad - we are writing local time, not GMT time, so adding GMT do the time is creating invalid timestamp in database for every timezone except GMT.
It is necessary to remove "GMT" from SQL statement (line 296). If no timezone will be entered, Postgreql should treat it like local time, and add local time zone, which is OK. Or eventually, correct timezone can be added to SQL command (line 296).
Removing "GMT" from SQL statement (line 296) doesn't resolve the problem. At least in my tests.
I attach log example that shows that.
Insert into inbox table:
If you compare received date/time from SMS: Decoding date & time: