Activity log for bug #2052593

Date Who What changed Old value New value Message
2024-02-07 08:18:40 Radovan Pieter bug added bug
2024-02-07 11:53:03 Radovan Pieter description Hi, i came across problem with localtz() function. Per your documentation I understand localtz() function returns timezone information by returning offset seconds to UTC TZ. But in code there's bad if (line 325: https://opendev.org/openstack/yaql/src/branch/master/yaql/standard_library/date_time.py#L325) - there is used parameter "time.daylight" which does NOT indicate whether there is currently DST. It only (per multiple issues found on internet) indicates whether the TZ does or does not have DST. You should better use time.localtime().tm_isdst which really indicates if DST is active or not. - We have usecase where we use yaql localtz() to get current time: now(offset=>localtz()).format("%Y-%m-%d %H:%M") -- But this approach is not correct now because it now return DST time (so +1hour to real time). Issue i reffer to: https://bugs.python.org/issue7229 Hi, i came across problem with localtz() function. Per your documentation I understand localtz() function returns timezone information by returning offset seconds to UTC TZ. But in code there's bad if statement (line 325: https://opendev.org/openstack/yaql/src/branch/master/yaql/standard_library/date_time.py#L325) - there is used parameter "time.daylight" which does NOT indicate whether there is currently DST. It only (per multiple issues found on internet) indicates whether the TZ does or does not have DST. You should better use time.localtime().tm_isdst which really indicates if DST is active or not. - We have usecase where we use yaql localtz() to get current time: now(offset=>localtz()).format("%Y-%m-%d %H:%M") -- But this approach is not correct now because it now return DST time (so +1hour to real time). Issue i reffer to: https://bugs.python.org/issue7229
2024-02-07 11:54:22 Radovan Pieter description Hi, i came across problem with localtz() function. Per your documentation I understand localtz() function returns timezone information by returning offset seconds to UTC TZ. But in code there's bad if statement (line 325: https://opendev.org/openstack/yaql/src/branch/master/yaql/standard_library/date_time.py#L325) - there is used parameter "time.daylight" which does NOT indicate whether there is currently DST. It only (per multiple issues found on internet) indicates whether the TZ does or does not have DST. You should better use time.localtime().tm_isdst which really indicates if DST is active or not. - We have usecase where we use yaql localtz() to get current time: now(offset=>localtz()).format("%Y-%m-%d %H:%M") -- But this approach is not correct now because it now return DST time (so +1hour to real time). Issue i reffer to: https://bugs.python.org/issue7229 Hi, i came across problem with localtz() function. Per your documentation I understand localtz() function returns timezone information by returning offset seconds to UTC TZ. But in code there's bad if statement (line 325: https://opendev.org/openstack/yaql/src/branch/master/yaql/standard_library/date_time.py#L325) - there is used parameter "time.daylight" which does NOT indicate whether there is currently DST active. It only (per issues found on internet) indicates whether the TZ does or does not have DST. You should better use time.localtime().tm_isdst which really indicates if DST is active or not. - We have usecase where we use yaql localtz() to get current time: now(offset=>localtz()).format("%Y-%m-%d %H:%M") -- But this approach is not correct now because it now return DST time (so +1hour to real time). Issue i reffered to: https://bugs.python.org/issue7229
2024-03-12 15:01:11 Takashi Kajinami yaql: status New In Progress
2024-03-12 15:01:15 Takashi Kajinami yaql: importance Undecided Medium
2024-03-12 15:01:37 Takashi Kajinami yaql: assignee Radovan Pieter (the-rdvn)
2024-03-12 16:07:07 Radovan Pieter description Hi, i came across problem with localtz() function. Per your documentation I understand localtz() function returns timezone information by returning offset seconds to UTC TZ. But in code there's bad if statement (line 325: https://opendev.org/openstack/yaql/src/branch/master/yaql/standard_library/date_time.py#L325) - there is used parameter "time.daylight" which does NOT indicate whether there is currently DST active. It only (per issues found on internet) indicates whether the TZ does or does not have DST. You should better use time.localtime().tm_isdst which really indicates if DST is active or not. - We have usecase where we use yaql localtz() to get current time: now(offset=>localtz()).format("%Y-%m-%d %H:%M") -- But this approach is not correct now because it now return DST time (so +1hour to real time). Issue i reffered to: https://bugs.python.org/issue7229 Hi, i came across problem with localtz() function. Per your documentation I understand localtz() function returns timezone information by returning offset seconds to UTC TZ. But in code there's bad if statement (line 325: https://opendev.org/openstack/yaql/src/branch/master/yaql/standard_library/date_time.py#L325) - there is used parameter "time.daylight" which does NOT indicate whether there is currently DST active. It only (per issues found on internet) indicates whether the TZ does or does not have DST. You should better use time.localtime().tm_isdst which really indicates if DST is active or not. - We have usecase where we use yaql localtz() to get current time: now(offset=>localtz()).format("%Y-%m-%d %H:%M") -- But this approach is not correct now because it now return DST time (so +1hour to real time). Issue i reffered to: https://bugs.python.org/issue7229 ---- Closes-Bug: #2052593
2024-03-19 01:30:16 OpenStack Infra yaql: status In Progress Fix Released