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 3 3106 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
"Victor Bazarov" <v.********@com Acast.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
Jens Theisen wrote:
"Victor Bazarov" <v.********@com Acast.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: vertigo |
last post by:
Hello
How can i count how many there were days since 1 Jan 1970 ?
Thanx
Michal
|
by: Steve |
last post by:
I have a value that represents the time in milliseconds passed since
1970 00:00:00 GMT that I need to convert into a readable date e.g.
1092364211773 = 13/08/2004 03:30:00 GMT
Is this easily done or do I need to write my own function for this???
If that's the case, does anyone have some code to do this???
Thanks in advance
|
by: Tom |
last post by:
Please help.
I need a quick little scrpit to place on a web page that will count
how many days have passed since January 1, 1970. I have ZERO
experience writing ANY scripts. Anyone have any suggestions?
As for what is displayed on the screen, I just want it to say:
Today is: 12578 (or however many days have passed since that date.)
|
by: zaphod |
last post by:
Fedora 3
Apache 2
PHP 5.0
I have a client's website running on Linux at www.dsvr.co.uk, a well
respected hosting company, and PHP's mktime() as on many Linux versions
still can't handle dates prior to 1970. This is madness. Can anyone explain
why the problem with mktime()'s dependence on glibc STILL hasn't been
addressed as of PHP 5? I can't believe the PHP developers continute to keep
their head in the sand with regard to mktime() and...
|
by: Maziar Aflatoun |
last post by:
Hi,
Can someone please tell me how I can set DateTime to 01/01/1970 (UTC).
Doing the following
DateTime dt1 = new DateTime(1970, 1,1);
Debug.WriteLine("dt1(utc):"+ dt1.ToUniversalTime().ToString());
Doing the following returns 1/1/1970 5:00:00 AM
| |
by: Alex |
last post by:
Hello,
I'm starting to spam this group..I need a function that is equal to
this function in JAVA:
System.currentTimeMillis();
that returns the difference, measured in milliseconds, between the
current time and midnight, January 1, 1970 UTC. (output is like this:
1141375007171 )
|
by: Bllich |
last post by:
Hello.
I have a problem with setting up time format in Access that I need..
I have to have something like this HH:MM:SS:MMM
that is hour:minutes:seconds:miliseconds
and be able to sum miliseconds like 500+700=1200ms=1s and 200ms
Please help..
--
|
by: vunet.us |
last post by:
What is the best method to convert milliseconds (after midnight
January 1, 1970 GMT) to formatted time
example:
972798180000 ==10/18/2000 14:08:11
|
by: Grey Alien |
last post by:
I need to convert timestamps that are given as the number of seconds
that have elapsed since midnight UTC of January 1, 1970, (not counting
leap seconds).
It seems all of the std C functions expect positive offsets from this
date and are incapable of working on dates preceeding the epoch (i.e.
negative offsets) - which IMHO shows a remarkable lack of foresight -
and is *just* a little bit annoying.
Does anyone know of an algo I can...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |