I wrote my first actual piece of Ruby code, recently. My watch has (as well as the usual hands) a hand that makes one sweep every 24 hours, and is currently set to London time (BST, at present, but for the sake of argument, I am considering it as GMT / Zulu time). I was curious as to when it and the normal hour hand would line up, and as I was in
(
Read more... )
Reply
Reply
Is it 1000 and 5am, then?
Reply
More generally, it will be when the time since local midnight is equal to the amount of time you are behind GMT. For example, Moscow is +0300, which means that GMT is 21 hours ahead (as we aren't concerned with dates), so that 21:00 (9pm) in Moscow is 18:00 in London.
In essence, if the local clock begins at midnight, the GMT clock begins x hours ahead, but then advances at half the rate of the local clock, so that after an additional x hours, the local hour hand shows x o'clock, and the GMT hand shows 2x o'clock, which puts them at the same location.
I hope that makes sense. It does in my mind, but I'm not sure I've explained well.
Reply
I'm kind of proud of myself for doing so, which is maybe a sad commentary on the efficiency of my brain these days. :-)
Reply
Leave a comment