Fix timezone bug reported by Jin Chen.

This commit is contained in:
Dianne Skoll
2025-10-08 04:09:33 +11:00
parent 0ecca26da8
commit 561245a5e8
4 changed files with 29 additions and 0 deletions

View File

@@ -873,6 +873,8 @@ void ProduceCalendar(void)
LocalDSEToday -= ((LocalDSEToday+1)%7);
}
LocalSysTime = 0;
SysTime = 0;
GenerateCalEntries(-1);
if (!DoSimpleCalendar) {

View File

@@ -141,6 +141,8 @@ void EnterTimezone(char const *tz)
CurDay = tm.tm_mday;
CurMon = tm.tm_mon;
CurYear = tm.tm_year + 1900;
DSEToday = DSE(CurYear, CurMon, CurDay);
/* Adjust DSEToday back by a day if midnight in our time zone requires it */
if (SysTime < LocalSysTime) {
DSEToday--;

View File

@@ -164,6 +164,19 @@ EOF
TZ=America/Toronto $REMIND -s - 2025-09-01@00:00 <<'EOF' >> $OUT 2>&1
REM 2025-09-24 AT 09:00 TZ America/Denver MSG Dr. Smith
EOF
echo "" >> $OUT
# Bug reported by Jin Chen
TZ=Australia/Sydney $REMIND -s - 2025-10-01 <<'EOF' >> $OUT 2>&1
REM Wednesday AT 14:00 TZ America/Toronto MSG 2PM Eastern
EOF
echo "" >> $OUT
# And the inverse...
TZ=America/Toronto $REMIND -s - 2025-10-01 <<'EOF' >> $OUT 2>&1
REM Wednesday AT 14:00 TZ Australia/Sydney MSG 2PM Sydney
EOF
cmp -s $OUT $CMP
if [ "$?" = "0" ] ; then
echo "Remind: Time zone test PASSED"

View File

@@ -79,3 +79,15 @@ trig("Mon at 00:00 TZ Australia/Sydney", "Tue at 00:00 TZ America/Toronto", "Wed
-stdin-(14:21): Trig = Monday, 1 September, 2025 AT 14:42
2025-09-01
2025/09/24 * * * 660 11:00am Dr. Smith
2025/10/02 * * * 240 4:00am 2PM Eastern
2025/10/09 * * * 300 5:00am 2PM Eastern
2025/10/16 * * * 300 5:00am 2PM Eastern
2025/10/23 * * * 300 5:00am 2PM Eastern
2025/10/30 * * * 300 5:00am 2PM Eastern
2025/10/01 * * * 0 12:00am 2PM Sydney
2025/10/07 * * * 1380 11:00pm 2PM Sydney
2025/10/14 * * * 1380 11:00pm 2PM Sydney
2025/10/21 * * * 1380 11:00pm 2PM Sydney
2025/10/28 * * * 1380 11:00pm 2PM Sydney