Skip to main content

Timeline for Date Time - Seconds Difference

Current License: CC BY-SA 3.0

9 events
when toggle format what by license comment
Jun 4, 2018 at 9:08 answer added Toby Speight timeline score: 1
Dec 31, 2011 at 23:28 vote accept hiddensunset4
Nov 29, 2011 at 20:23 history tweeted twitter.com/#!/StackCodeReview/status/141613150331080706
Nov 28, 2011 at 21:58 comment added hiddensunset4 @LokiAstari yes that function is correct, directly implemented from the Wikipedia page haha. As mentioned already however, accuracy is not the issue here.
Nov 28, 2011 at 21:31 comment added Loki Astari I don't see why you are using gmtime_r() at the top. If you set the other fields to blank they will be set up correctly: struct tm t1 = {0}; Also the second way not only takes into account leap year but also leap seconds and any missed days that were removed from the calendar for that local (so it is doing significantly more work).
Nov 28, 2011 at 21:17 comment added Loki Astari Did you get is_leap_year() correct? Remember you need to check for 100 and 400 year boundaries.
Nov 28, 2011 at 17:58 answer added Jerry Coffin timeline score: 5
Nov 28, 2011 at 16:27 history edited hiddensunset4 CC BY-SA 3.0
added 11 characters in body
Nov 28, 2011 at 16:19 history asked hiddensunset4 CC BY-SA 3.0