[Python-Dev] Fw: [boost] GDTL - Time Library (Version 052) - (original) (raw)
[Python-Dev] Fw: [boost] GDTL - Time Library (Version 052) -- Request for review
David Abrahams David Abrahams" <david.abrahams@rcn.com
Mon, 11 Mar 2002 23:21:49 -0500
- Previous message: [Python-Dev] PEP 263 considered faulty (for some Japanese)
- Next message: [Python-Dev] PEP 263 considered faulty (for some Japanese)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
For what it's worth to you...
----- Original Message ----- From: "Jeff Garland" <jeff@crystalclearsoftware.com> To: <boost@yahoogroups.com> Sent: Monday, March 11, 2002 11:12 PM Subject: [boost] GDTL - Time Library (Version 052) -- Request for review
All -
I have uploaded a second GDTL submission which now includes both a gregorian date system and a time system as well. The time system has nano-second resolution with no built in adjustments for time zones or leap seconds. I expect we will eventually add other time systems that handle these adjustments. However the current library should cover a wide variety of applications and will be plenty to review. Here are some usage examples from the docs: using namespace gregorian; using namespace posixtime; date d(2002,Feb,1); //an arbitrary date ptime t1(d, hours(5)+nanosec(100));//date + time of day offset ptime t2 = t1 - minutes(4)+seconds(2); ptime now = secondclock::localtime(); //use the clock //Get the date part out of the time date today = now.date(); date tommorrow = today + dateduration(1); ptime tommorrowstart(tommorrow); //midnight tommorrow //starting at current time iterator adds by one hour timeiterator titr(now,hours(1)); for (; titr < tommorrowstart; ++titr) {_ _std::cout << tosimplestring(*titr) << std::endl;_ _}_ _//convert a utc time to a local time using the TZ settings of the_ machine _typedef gdtl::localadjustor localadj; ptime t10(date(2002,Jan,1), hours(7)); //the utc time ptime t11 = localadj::utctolocal(t10);
The files including extensive test programs and examples can be found here: http://groups.yahoo.com/group/boost/files/GDTL/ The package includes an overview documentation page, but most of the documentation remains online at: http://www.crystalclearsoftware.com/gdtl/gdtlrefguide/index.html As for compilers, this code has compiled and tested against BCC5.1.1, gcc3.0.3 Linux, gcc2.95-3 cygwin, and gcc2.95.3 Linux. MSVC7 RC2 has some errors in utc to local conversion templates, but is mostly ok. MSVC6 is likely similar to MSVC7 based on experience with previous versions. Jeff
- Previous message: [Python-Dev] PEP 263 considered faulty (for some Japanese)
- Next message: [Python-Dev] PEP 263 considered faulty (for some Japanese)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]