Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-01

convert "epoch" to UTC (waldo kitty)

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

edgar jordan

12 == 2012
013 == 13th day of the year
.9338171 * 24 == 22.4116104 hours
.4114104 * 60 == 24.696624 minutes

The decimal portion of hours doesn't match the one multiplied by 60. I just thought it's the one causing the discrepancy.

waldo kitty
to edgar jordan
edgar jordan wrote
12 == 2012 013 == 13th day of the year .9338171 * 24 == 22.4116104 hours

i typoed the above... it should be

.93338171 * 24 == 22.40116104 hours

.4114104 * 60 == 24.696624 minutes

so this becomes

.40116104 * 60 == 24.0696624 minutes

which then leads to

.0696624 * 60 == 4.179744 seconds

The decimal portion of hours doesn't match the one multiplied by 60. I just thought it's the one causing the discrepancy.

ahhh... it took me a minute to find that errant '4' in there :lol: yeah, that could cause the problem but in this case, i dropped a '3' much earlier :/

so, i'm on the right track... just gotta use the right numbers... now to find the right formula ;)