You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The replace_string introduced in commit be5dad4 contains an hardcoded strptime() format string to parse activefrom and activeuntil dates. However, I'm using Postgresql, and my schema is laid out as:
activefrom | timestamp with time zone | default '2000-01-01 00:00:00+01'::timestamp with time zone
activeuntil | timestamp with time zone | default '2000-01-01 00:00:00+01'::timestamp with time zone
Which means that the results of the query will be:
postfix=# SELECT activefrom,activeuntil FROM vacation WHERE email='....';
activefrom | activeuntil
------------------------+------------------------
2024-04-10 11:14:00+02 | 2024-04-13 13:14:00+02
(1 row)
Therefore the script will produce complaints:
(garbage at end of string in strptime: 00:00:00+02 at /usr/lib64/perl5/Time/Piece.pm line 481, <STDI)
According to perl_date_time.htm there's no way to catch the "+02" relative to the UTC offset.
Therefore I propose casting the field directly in the query, which solves the problem. I've validated the syntax with MySQL as well.
The text was updated successfully, but these errors were encountered:
The replace_string introduced in commit be5dad4 contains an hardcoded strptime() format string to parse activefrom and activeuntil dates. However, I'm using Postgresql, and my schema is laid out as:
Which means that the results of the query will be:
Therefore the script will produce complaints:
According to perl_date_time.htm there's no way to catch the "+02" relative to the UTC offset.
Therefore I propose casting the field directly in the query, which solves the problem. I've validated the syntax with MySQL as well.
The text was updated successfully, but these errors were encountered: