▲ 1106 ▼ Daylight saving creator left the chat.... (lemmy.world) submitted 2 years ago by devilish666@lemmy.world to c/programmer_humor@programming.dev 243 comments fedilink hide all child comments
[–] uis@lemm.ee 4 points 2 years ago* (1 child) time always goes forward It not always goes and not always forward. I think you need metric time(TAI) instread. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 5 points 2 years ago* (last edited 2 years ago) (1 child) UTC always goes forward regardless of the timezone and local time. That is why you should use it. To take my EPG situation above, I stored program start / end times in UTC so they would render properly even if DST kicked in or not during the middle of the program. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 2 points 2 years ago* (1 child) Ok, this is more unix time quirk that can't handle 24:00:00 and skipping 23:59:59. UTC always goes forward regardless of the timezone and local time But not unix time. I stored program start / end times in UTC If your program finishes in less than one seond it might report negative time. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 4 points 2 years ago (1 child) I didn't say Unix time, I said UTC. And no it won't report negative time, not unless somehow the system clock was modified while it was running.. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago* (last edited 2 years ago) (1 child) not unless somehow the system clock was modified while it was running.. Which is how most systems handle leap seconds. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 0 points 2 years ago* (1 child) Leap seconds still make time go forwards, not backwards. NTP clients would also resolve small time discrepancies while still advancing forwards prior to the next time sync. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago* (1 child) Leap seconds can make time go both ways, but adding them makes time stop/go back because 24:00:00 cannot be represented as 1/86400 part of day N instead of day N+1 on major OSes. And they were only added so far. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 1 point 2 years ago* (last edited 2 years ago) (1 child) It doesn't work like that. UTC goes forward always. Leap seconds are scheduled and known in advance. NTP time services will just smear time advancement a little to account for an additional second. Time never has to go backwards. This is how Google does it. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago This is how Google does it in their datacenters, but not major OSes by default permalink fedilink source parent
[–] arc@lemm.ee 5 points 2 years ago* (last edited 2 years ago) (1 child) UTC always goes forward regardless of the timezone and local time. That is why you should use it. To take my EPG situation above, I stored program start / end times in UTC so they would render properly even if DST kicked in or not during the middle of the program. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 2 points 2 years ago* (1 child) Ok, this is more unix time quirk that can't handle 24:00:00 and skipping 23:59:59. UTC always goes forward regardless of the timezone and local time But not unix time. I stored program start / end times in UTC If your program finishes in less than one seond it might report negative time. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 4 points 2 years ago (1 child) I didn't say Unix time, I said UTC. And no it won't report negative time, not unless somehow the system clock was modified while it was running.. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago* (last edited 2 years ago) (1 child) not unless somehow the system clock was modified while it was running.. Which is how most systems handle leap seconds. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 0 points 2 years ago* (1 child) Leap seconds still make time go forwards, not backwards. NTP clients would also resolve small time discrepancies while still advancing forwards prior to the next time sync. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago* (1 child) Leap seconds can make time go both ways, but adding them makes time stop/go back because 24:00:00 cannot be represented as 1/86400 part of day N instead of day N+1 on major OSes. And they were only added so far. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 1 point 2 years ago* (last edited 2 years ago) (1 child) It doesn't work like that. UTC goes forward always. Leap seconds are scheduled and known in advance. NTP time services will just smear time advancement a little to account for an additional second. Time never has to go backwards. This is how Google does it. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago This is how Google does it in their datacenters, but not major OSes by default permalink fedilink source parent
[–] uis@lemm.ee 2 points 2 years ago* (1 child) Ok, this is more unix time quirk that can't handle 24:00:00 and skipping 23:59:59. UTC always goes forward regardless of the timezone and local time But not unix time. I stored program start / end times in UTC If your program finishes in less than one seond it might report negative time. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 4 points 2 years ago (1 child) I didn't say Unix time, I said UTC. And no it won't report negative time, not unless somehow the system clock was modified while it was running.. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago* (last edited 2 years ago) (1 child) not unless somehow the system clock was modified while it was running.. Which is how most systems handle leap seconds. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 0 points 2 years ago* (1 child) Leap seconds still make time go forwards, not backwards. NTP clients would also resolve small time discrepancies while still advancing forwards prior to the next time sync. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago* (1 child) Leap seconds can make time go both ways, but adding them makes time stop/go back because 24:00:00 cannot be represented as 1/86400 part of day N instead of day N+1 on major OSes. And they were only added so far. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 1 point 2 years ago* (last edited 2 years ago) (1 child) It doesn't work like that. UTC goes forward always. Leap seconds are scheduled and known in advance. NTP time services will just smear time advancement a little to account for an additional second. Time never has to go backwards. This is how Google does it. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago This is how Google does it in their datacenters, but not major OSes by default permalink fedilink source parent
[–] arc@lemm.ee 4 points 2 years ago (1 child) I didn't say Unix time, I said UTC. And no it won't report negative time, not unless somehow the system clock was modified while it was running.. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago* (last edited 2 years ago) (1 child) not unless somehow the system clock was modified while it was running.. Which is how most systems handle leap seconds. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 0 points 2 years ago* (1 child) Leap seconds still make time go forwards, not backwards. NTP clients would also resolve small time discrepancies while still advancing forwards prior to the next time sync. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago* (1 child) Leap seconds can make time go both ways, but adding them makes time stop/go back because 24:00:00 cannot be represented as 1/86400 part of day N instead of day N+1 on major OSes. And they were only added so far. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 1 point 2 years ago* (last edited 2 years ago) (1 child) It doesn't work like that. UTC goes forward always. Leap seconds are scheduled and known in advance. NTP time services will just smear time advancement a little to account for an additional second. Time never has to go backwards. This is how Google does it. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago This is how Google does it in their datacenters, but not major OSes by default permalink fedilink source parent
[–] uis@lemm.ee 1 point 2 years ago* (last edited 2 years ago) (1 child) not unless somehow the system clock was modified while it was running.. Which is how most systems handle leap seconds. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 0 points 2 years ago* (1 child) Leap seconds still make time go forwards, not backwards. NTP clients would also resolve small time discrepancies while still advancing forwards prior to the next time sync. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago* (1 child) Leap seconds can make time go both ways, but adding them makes time stop/go back because 24:00:00 cannot be represented as 1/86400 part of day N instead of day N+1 on major OSes. And they were only added so far. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 1 point 2 years ago* (last edited 2 years ago) (1 child) It doesn't work like that. UTC goes forward always. Leap seconds are scheduled and known in advance. NTP time services will just smear time advancement a little to account for an additional second. Time never has to go backwards. This is how Google does it. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago This is how Google does it in their datacenters, but not major OSes by default permalink fedilink source parent
[–] arc@lemm.ee 0 points 2 years ago* (1 child) Leap seconds still make time go forwards, not backwards. NTP clients would also resolve small time discrepancies while still advancing forwards prior to the next time sync. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago* (1 child) Leap seconds can make time go both ways, but adding them makes time stop/go back because 24:00:00 cannot be represented as 1/86400 part of day N instead of day N+1 on major OSes. And they were only added so far. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 1 point 2 years ago* (last edited 2 years ago) (1 child) It doesn't work like that. UTC goes forward always. Leap seconds are scheduled and known in advance. NTP time services will just smear time advancement a little to account for an additional second. Time never has to go backwards. This is how Google does it. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago This is how Google does it in their datacenters, but not major OSes by default permalink fedilink source parent
[–] uis@lemm.ee 1 point 2 years ago* (1 child) Leap seconds can make time go both ways, but adding them makes time stop/go back because 24:00:00 cannot be represented as 1/86400 part of day N instead of day N+1 on major OSes. And they were only added so far. permalink fedilink source parent hideshow 2 child comments replies: [–] arc@lemm.ee 1 point 2 years ago* (last edited 2 years ago) (1 child) It doesn't work like that. UTC goes forward always. Leap seconds are scheduled and known in advance. NTP time services will just smear time advancement a little to account for an additional second. Time never has to go backwards. This is how Google does it. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago This is how Google does it in their datacenters, but not major OSes by default permalink fedilink source parent
[–] arc@lemm.ee 1 point 2 years ago* (last edited 2 years ago) (1 child) It doesn't work like that. UTC goes forward always. Leap seconds are scheduled and known in advance. NTP time services will just smear time advancement a little to account for an additional second. Time never has to go backwards. This is how Google does it. permalink fedilink source parent hideshow 2 child comments replies: [–] uis@lemm.ee 1 point 2 years ago This is how Google does it in their datacenters, but not major OSes by default permalink fedilink source parent
[–] uis@lemm.ee 1 point 2 years ago This is how Google does it in their datacenters, but not major OSes by default permalink fedilink source parent