Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Specifying Date From Long With Different Epoch

807588Feb 27 2009 — edited Feb 27 2009
Hi Guys,

I've done a little research on google and cannot seem to find a solution to this, so i think i'm missing a trick here. When you use the Date constructor and pass in a long, java will treat the long as the number of milliseconds from the Epoch date which is the 1st of January 1970. Is there a way to change the Epoch?

The reason I ask is that, I am being passed a long which specifies in milliseconds the time from a different Epoch 1 January 1900. The question is how do I create a java date object from this number? The only way I could think of is to change the epoch in the Date class. Does anyone have a solution to this?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 27 2009
Added on Feb 27 2009
1 comment
196 views