for those that were alive at epoch...

R

Rob Shepherd

this piece of code

....
long l = 0;
System.out.println(new Date(l));
....

does this

Thu Jan 01 01:00:00 GMT 1970

should this not be *midnight at epoch* NOT 1 am ?

Rob
 
S

Steve Horsley

Rob said:
this piece of code

...
long l = 0;
System.out.println(new Date(l));
...

does this

Thu Jan 01 01:00:00 GMT 1970

should this not be *midnight at epoch* NOT 1 am ?

Rob

Ah, but you're running on British Summer Time, which is one
hour ahead of UT. Try it in another 6 months, when you're back
on GMT.

Steve
 
M

Mark Thornton

Steve said:
Ah, but you're running on British Summer Time, which is one hour ahead
of UT. Try it in another 6 months, when you're back on GMT.

Steve

Java is supposed to report times based on the daylight offset at the
time in question NOT whatever the offset is now (which is what windows
does).

In 1.4 Java is reporting historically correct timezone offsets. Between
1968 and 1971 the UK operated what was known as single/double daylight
time. Thus during the winter the timezone offset was one hour ahead of UTC.

So Java is entirely correct, as people with very long memories might
attest!!!

http://www.srcf.ucam.org/~jsm28/british-time/

Mark Thornton
 
M

Mark Thornton

Mark said:
Java is supposed to report times based on the daylight offset at the
time in question NOT whatever the offset is now (which is what windows
does).

In 1.4 Java is reporting historically correct timezone offsets. Between
1968 and 1971 the UK operated what was known as single/double daylight
time. Thus during the winter the timezone offset was one hour ahead of UTC.

So Java is entirely correct, as people with very long memories might
attest!!!

http://www.srcf.ucam.org/~jsm28/british-time/

Mark Thornton


On second thoughts there is an error in the use of the abbreviation GMT.
So Java is correct in that the UK local time at the epoch was one hour
ahead of UTC, but the correct abbreviation certainly wasn't GMT. The
locally correct abbreviation was probably BST (I wasn't in the UK at
that time).

Mark Thornton
 
S

Steve Horsley

Mark said:
On second thoughts there is an error in the use of the abbreviation GMT.
So Java is correct in that the UK local time at the epoch was one hour
ahead of UTC, but the correct abbreviation certainly wasn't GMT. The
locally correct abbreviation was probably BST (I wasn't in the UK at
that time).

Mark Thornton

Thank you mark. It dawned on me that I might be wrong a couple of hours
after I posted, but I didn't know what the real answer was.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top