TEMPLEOS BUG: TIMEZONES



Site Index



Publish Date: September 23rd, 2023

Revision Date: September 26th, 2023

This post has been edited. The original version has been archived at https://archive.ph/oMPzu.



Synopsis

The issue I - alongside others - had found was that TempleOS did not display the correct time/date on the background wallpaper. The wallpaper is, for the uninitiated, the large deep-blue backdrop of the display.


Issue

The error is begun by a value set in the user's HomeLocalize.HC.Z file; local_time_offset. It is used by the system to offset the time by the end user's timezone.

In the function WallPaper (C:/Adam/WallPaper.HC.Z), the function Now; - which returns the current time in a struct, subtracted by the local_time_offset is called - but also with the addition of local_time_offset. This results in WallPaper not displaying the time correctly.



Code of note: Now;.

Problem code: WallPaper;


Solution

The solution is extremely simple. Delete the addition of +local_time_offset from the call of Date2Struct in WallPaper.



Fixed code: WallPaper;