473,463 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

POSIX Time

Does anybody have some source code that converts the number of seconds since
janurary 1st 1970 into the current time in hours, minutes & seconds format?
I have had a look on google but could not find anything.

thanks

DJ
Jul 22 '05 #1
2 2030
Dan J posted:
Does anybody have some source code that converts the number of seconds
since janurary 1st 1970 into the current time in hours, minutes &
seconds format? I have had a look on google but could not find
anything.

thanks

DJ


Get a C++ reference. Here's one I like:

http://www.roguewave.com/support/doc...Pro/stdlibref/
Look at the header <ctime>. This will tell you about all the in-built time
functionality in C++.
From there, you'll have to write your own code that will express time as the
magnitude of the period of time elapsed since Janurary 1st 1970. Ofcourse,
there may be some code out there already that does this... hint: Google.
-JKop
Jul 22 '05 #2
See boost library.

The date-time library (http://www.boost.org/libs/date_time/doc/index.html)
provides a lot of good stuff.

Catalin

"Dan J" <da****************@hotmail.com> wrote in message
news:41**********@baen1673807.greenlnk.net...
Does anybody have some source code that converts the number of seconds
since
janurary 1st 1970 into the current time in hours, minutes & seconds
format?
I have had a look on google but could not find anything.

thanks

DJ

Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Peter Åstrand | last post by:
There's a new PEP available: PEP 324: popen5 - New POSIX process module A copy is included below. Comments are appreciated. ---- PEP: 324 Title: popen5 - New POSIX process module
0
by: RN | last post by:
Hi, I don't know if this is the right place to ask this, but - what's the difference between posix and perl regular expressions? A good example is "aa|bb". Will this match "aa" or "ab" in...
0
by: steffen staehle | last post by:
Hi, I'm writing a server process which spawns child processes via fork This server process should keep track of the number of children stil running, do the necessary cleanup to avoid zombies,...
2
by: raxitsheth | last post by:
Hello All... I am using Posix Thread. class Parent { public: virtual void* func(void *)=0;
11
by: FiLH | last post by:
Hello, I would like to know if posix semaphores are inter processes or just semaphores for threads inside the same process. I have not seen it defined in the posix specification I have found,...
3
by: Leonard J. Reder | last post by:
Hello, I am using an Absoft FORTRAN/C compiler to compile some legacy code on a Windows XP machine. The open, read, write, close are missing from the C code. Does anyone know of source code for...
6
by: Sébastien Boisgérault | last post by:
Hi, I'm searching for a POSIX 1003.2 compatible regular expression engine. The Python binding "pregex" by Neal Becker may do the job, but I did not manage to download it as the original link...
23
by: Boltar | last post by:
Hi I'm writing a threading class using posix threads on unix with each thread being run by an object instance. One thing I'm not sure about is , if I do the following: myclass::~myclass() {...
8
by: Michele 'xjp' | last post by:
Hi there, I am using a POSIX-compliant system, Cygwin on Windows. I need the features of conio.h's getch() and clrscr(), but I can't compile programs with #include <conio.h(since conio.h is NOT...
23
by: asit | last post by:
what is the difference between portable C, posix C and windows C ???
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
tracyyun
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...
0
agi2029
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,...
0
isladogs
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
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 ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.