Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem figuring out a date

0 views
Skip to first unread message

Norm

unread,
Oct 9, 2008, 8:42:48 PM10/9/08
to
Hi,

The new version of firefox is storing their expire date in this 10 digit
format:

2145801610

and according to the information in the browser this should be the date:

Wednesday, December 30, 2037 9:00:00 AM

Does anyone know how they are converting that number to that date. I have
tried IsDate and Format, but get errors for wrong value. So I am assuming
that the ten digit number does not appear to be a date.

Thanks,
Norm

MP

unread,
Oct 9, 2008, 8:56:16 PM10/9/08
to

"Norm" <Nor...@newsgroups.nospam> wrote in message
news:O$p3eEnKJ...@TK2MSFTNGP05.phx.gbl...

did you try Julian?
just a thought
mark


Bob Butler

unread,
Oct 9, 2008, 9:07:08 PM10/9/08
to
"Norm" <Nor...@newsgroups.nospam> wrote in message
news:O$p3eEnKJ...@TK2MSFTNGP05.phx.gbl...

Try number of seconds since 1/1/1970 (and compensate for offset from UTC)

I get 2145801600 for somebody 7 hours off GMT which seems too close to be a
coincidence

Bill McCarthy

unread,
Oct 9, 2008, 9:27:38 PM10/9/08
to
Hi Norm,

That's a standard JavaScript Date Object: the number of milliseconds in
Universal Coordinated Time between the specified date and midnight January
1, 1970.


"Norm" <Nor...@newsgroups.nospam> wrote in message
news:O$p3eEnKJ...@TK2MSFTNGP05.phx.gbl...

Karl E. Peterson

unread,
Oct 9, 2008, 9:28:50 PM10/9/08
to
Norm wrote:
> The new version of firefox is storing their expire date in this 10 digit
> format:
>
> 2145801610
>
> and according to the information in the browser this should be the date:
>
> Wednesday, December 30, 2037 9:00:00 AM

What Bob said...

Public Function NetTimeToVbTime(ByVal NetDate As Long) As Double
Const BaseDate# = 25569 'DateSerial(1970, 1, 1)
Const SecsPerDay# = 86400
NetTimeToVbTime = BaseDate + (CDbl(NetDate) / SecsPerDay)
End Function

Public Function VbTimeToNetTime(ByVal VbDate As Double) As Long
Const BaseDate# = 25569 'DateSerial(1970, 1, 1)
Const SecsPerDay# = 86400
VbTimeToNetTime = (VbDate - BaseDate) * SecsPerDay
End Function

That gives me this:

?vbtimetonettime(cdbl(#12/30/2037 9:00:00 AM#))
2145776400

?cdate(nettimetovbtime(2145801610))
12/30/2037 4:00:10 PM

Account for UTC, and you're probably there.
--
.NET: It's About Trust!
http://vfred.mvps.org


Norm

unread,
Oct 9, 2008, 11:08:19 PM10/9/08
to

"Karl E. Peterson" <ka...@mvps.org> wrote in message
news:%23c%23zNenK...@TK2MSFTNGP02.phx.gbl...
Thanks All,

I see I still have a lot to learn, but think I am going to run out years
first. :-)

Thanks again,
Norm

Jeff Johnson

unread,
Oct 10, 2008, 9:21:37 AM10/10/08
to
"Norm" <Nor...@newsgroups.nospam> wrote in message
news:%23R$8yVoKJ...@TK2MSFTNGP03.phx.gbl...

> I see I still have a lot to learn, but think I am going to run out years
> first. :-)

Yes, this date scheme will stop working in 2038. And it's *NIX's default
scheme, if I recall correctly.

"Planned obsolescence?"


Oh, wait, did you mean YOUR years...?


0 new messages