Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#15855 closed bug (fixed)

DST prompt shows on every boot

Reported by: nephele Owned by: nobody
Priority: normal Milestone: R1/beta2
Component: Applications/Command Line Tools Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

This prompt just seems redundent if the system is already supposed to fetch the time from an authoritive server.

(Specific prompt asks about daylight saving time on bootup (not sure what triggers it to come up tbh))

Change History (11)

comment:1 by pulkomandy, 4 years ago

The DST change triggers it. It will go away in EU next year since we are dropping DST here (yay!).

NTP is not related: it does not know about timezones and DST changes. Iy synchronizes the UTC time, and then timezones/DST applies an offset to that UTC time to compute the local time.

comment:2 by nephele, 4 years ago

Atleast on my machine i got it repeatedly on many sucessive boots, even if i answered that the clock is correct or set it, so having the correct time is atleast somewhat related, if we have the correct time via ntp figuring out whether DST is or isnt in effect should be quite possible :)

It will go away in EU next year since we are dropping DST here (yay!).

Unless we don't, again :D

comment:3 by pulkomandy, 4 years ago

Component: User InterfaceApplications/Command Line Tools
Owner: changed from stippi to nobody

That's a bug then. The prompt should pop twice per year, on DST changes only.

comment:4 by pulkomandy, 4 years ago

Type: enhancementbug

comment:5 by pulkomandy, 4 years ago

Summary: Skip DST prompt when ntp on boot is enabledDST prompt shows on every boot

comment:6 by nephele, 4 years ago

It may have popped up only on dst changes... if the initial date that was set in firmware is close to that, maybe?

That was only with broken CMOS battery anyhow, so the "bug" may be moreso that it doesn't offer to sync the time when it is obviously wrong (maybe we could add a known-in-the-past timestamp to builds and check against that on releases?)

Last edited 4 years ago by nephele (previous) (diff)

comment:7 by pulkomandy, 4 years ago

Well, if it's an hardware problem, should we do something about it? A prompt to tell you your CMOS battery is flat maybe?

I think the simplest thing would be to change how we detect if we were previously on DST. DSTcheck should store a file to remember "I already asked if the time is correct when switching to summertime", or something like that.

comment:8 by nephele, 4 years ago

Well, if it's an hardware problem, should we do something about it? A prompt to tell you your CMOS battery is flat maybe?

I think so, atleast on hardware platforms that don't have CMOS batteries oses usually remember the last timestamp of shutdown, and sometimes have a timestamp of the build as initial value or so, i think we could do something similar, as in store the time on shutdown and if it is further in the future than a week or so show an error that the time has changed considerably into the past and that the battery may have died (or an os fidled with the clock :P)

comment:9 by pulkomandy, 4 years ago

So, I checked what dstcheck does. It uses home/config/settings/time_dststatus which is a file with a single byte in it, either the ASCII char '1' or '0' indicating if the computer was in DST at the time of the previous check. It compares that with the DST indicator in the time returned by localtime_r.

I added a check if the year returned by localtime_r is before 2020, and in that case it will not check anything else: https://review.haiku-os.org/c/haiku/+/2684

This avoids the prompt showing up when the clock is not set properly.

comment:10 by waddlesplash, 4 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev54195.

comment:11 by nielx, 4 years ago

Milestone: UnscheduledR1/beta2

Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone

Note: See TracTickets for help on using tickets.