By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,375 Members | 3,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,375 IT Pros & Developers. It's quick & easy.

how to get the miliseconds before 1970?

P: n/a
Hi all, I'm looking for a function that basically does localtime() or
loacltime_s() but can handle dates before 1970. Does anyone know of
some?

-Pyong

Sep 19 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Py************@gmail.com wrote:
Hi all, I'm looking for a function that basically does localtime() or
loacltime_s() but can handle dates before 1970. Does anyone know of
some?
I, for one, am not sure what you mean.

If the operating system can handle dates before 1970, why wouldn't you
use the OS-provided mechanism? If the OS *cannot* handle dates before
1970, how would 'localtime' function? To *get* the *local time* using
'localtime' before 1970 on an OS that doesn't handle time before 1970,
you would first have to somehow *set* the *local time* to some date
before 1970, no? See why I say that I am not sure what you mean?

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Sep 21 '06 #2

P: n/a
"Victor Bazarov" <v.********@comAcast.netwrites:
I, for one, am not sure what you mean.
He said he want something that's _basically_ localtime. So he just
looking for date library that can deal with historical dates.

I can't see how that was unclear.

Jens
Sep 21 '06 #3

P: n/a
Jens Theisen wrote:
"Victor Bazarov" <v.********@comAcast.netwrites:
>I, for one, am not sure what you mean.

He said he want something that's _basically_ localtime. So he just
looking for date library that can deal with historical dates.

I can't see how that was unclear.
I always associated 'localtime' with time obtained from 'time' function.
I guess it should be possible to use 'localtime' with any value of type
'time_t', e.g. obtained from 'mktime' function. Is that what we are
talking about? So, if your standard library supports making 'time_t'
value from 'struct tm' that contains the date before 1970, then you could
use 'localtime' to convert that 'time_t' back, right?

I keep forgetting that some folks tend to ask "where to find blah?" here
instead of using Google (or any other search engines)... Go figure.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Sep 21 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.