summaryrefslogtreecommitdiffstats
path: root/tests/session.json
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2021-04-12 17:03:36 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-04-12 17:08:00 +0200
commit42c22539a3970395ebfd6c0f306ca18624089293 (patch)
treee6caba05bf820455b6c8474228de32f9f3f70653 /tests/session.json
parent0212091e7fa0b58f353a05cfc671bd544e08e07e (diff)
schedule: fix daylight saving problem with mktime()
mktime modifies the struct tm it receives and takes into account whether DST is active or not (tm_isdst). tm_isdst == 0 adjusts the time, which causes the time mismatch error. All fields are being initialized to 0 and therefore it is assumed that the time that has been passed is not in daylight saving time. When the value is negative in tm.tm_isdst it delegates to mktime to guess if it is in daylight saving time or not, this works 99% of the time. Best way would be that ogserver knows what is its timezone and when daylight saving applies, so tm_isdst is set to 0 or 1 accordingly. Meanwhile, "tm_isdst = -1" provides the hotfix.
Diffstat (limited to 'tests/session.json')
0 files changed, 0 insertions, 0 deletions