Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File time stamps are not adjusted for DST #2075

Open
NotherNgineer opened this issue Mar 30, 2024 · 0 comments
Open

File time stamps are not adjusted for DST #2075

NotherNgineer opened this issue Mar 30, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@NotherNgineer
Copy link
Contributor

NotherNgineer commented Mar 30, 2024

Describe the bug.

File modification time/date is not being updated for DST.

Reproduction

  1. Set clock and enable DST so that time is advanced by 1 hour.
  2. Modify a file.
  3. Look at file time stamp in File Manager.

Expected behavior

I think the time shown in File Manager should match the time displayed on the screen (DST-adjusted time).

Questions:

  • Not sure if File Manager should adjust the time values displayed (presumably adding an hour during the date range configured for DST), or if the date & time actually stored in the file info should be DST-adjusted time (would need to modify chbios get_fatttime() or rtcGetTimeFat() functions).
  • It seems that in most OS's the file time stamp is in UTC and the displayed date & time is modified (only when viewed) according to time zone and DST.
  • Perhaps we should do similar and add a time zone setting to pmem, and use UTC time in the RTC.
  • Existing PortaPack users may indeed choose to set the RTC to UTC time on Portapack but in that case they should know not to enable DST (firmware currently has no time zone support for converting UTC to local time; it can only adjust time by 1 hour for DST).
  • File time stamps need to be correct in SD-over-USB mode and when the SD card is plugged into a computer too.

More investigation is needed to determine how to proceed on this one.

Environment/versions

No response

Anything else?

No response

@NotherNgineer NotherNgineer added the bug Something isn't working label Mar 30, 2024
@NotherNgineer NotherNgineer self-assigned this Mar 30, 2024
@NotherNgineer NotherNgineer added enhancement New feature or request and removed bug Something isn't working labels Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant