Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Date & Time

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> General Programming
General Programming  
Author Message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Wed Nov 29, 2006 4:12 pm    Post subject: Date & Time Reply with quote

Sue Loh: GetTickCount – Truth and Fiction

"GetTickCount is a pretty simple API from the caller’s perspective. Every
millisecond the tick count increments, and you can use GetTickCount to
retrieve the number of milliseconds since boot. Since GetTickCount
returns only a 32-bit number, after about 49 days, the counter wraps.
This is documented behavior, and to properly use GetTickCount you have
to understand that. Typically GetTickCount is used to time the duration
between two events, in which case you’re generally safe if you subtract
two values; subtraction is safe in the presence of rollover. (eg. If you get
a tick count of 0xFFFFFF00 before the rollover, and a tick count of 0x200
after the rollover, subtraction gives you a difference of 0x300 as expected.)"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Oct 22, 2007 5:54 pm    Post subject: Reply with quote

#include <DateTimeUtils.h> // Mac

DateTimeRec - Date, Time, and Measurement Utilities Reference

Code:
struct DateTimeRec {
   short year;
   short month;
   short day;
   short hour;
   short minute;
   short second;
   short dayOfWeek;
};
typedef struct DateTimeRec DateTimeRec;


dayOfWeek
"The day of the week, where 1 indicates Sunday and 7 indicates Saturday.
This field accepts 0, negative values, or values greater than 7. When you
use the SecondsToDate and DateToSeconds procedures, you get correct
values because this field is automatically calculated from the values in
the year, month, and day fields."


Last edited by delovski on Thu Oct 25, 2007 10:48 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Oct 22, 2007 6:01 pm    Post subject: Reply with quote

#include <Winbase.h> // Win

SYSTEMTIME Structure - Win32 and COM Development>...>Time>Time Reference>Time Structures

Code:
typedef struct _SYSTEMTIME {
  WORD wYear;
  WORD wMonth;
  WORD wDayOfWeek;
  WORD wDay;
  WORD wHour;
  WORD wMinute;
  WORD wSecond;
  WORD wMilliseconds;
} SYSTEMTIME, *PSYSTEMTIME;


wDayOfWeek
"The day of the week. This member can be one of the following values:
0 - Sunday, 1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday,
6 - Saturday"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Wed Oct 31, 2007 7:05 pm    Post subject: Reply with quote

carbondev - Dates and Times

"The Mac OS has many APIs for manipulating dates and times. You might
want to avoid some of them because they are too old, and others because
they are too new. What follows is a brief overview of the main date / time
data types and compatibility notes about the APIs."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sun Apr 06, 2008 11:19 am    Post subject: Reply with quote

JoS: 12-hour clock confusion

"I'm a U.S. citizen, born and bred. I allegedly learned to tell time in the
U.S. public (that's government run) school system, and I STILL can't keep
straight whether 12 am is noon or midnight."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Thu Jan 15, 2009 3:28 pm    Post subject: Reply with quote

reddit - Feb/13/2009 at 23:31:30 UTC - the Unix time number reaches 1234567890 seconds.

"We threw a party in berkeley when time turned 1 billion. epoch time dis-
played in real-time on a projector, sparkling apple juice and a dozen hard-
core geeks in wozniak auditorium. god where have those 234567890 se-
conds gone?"
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Tue Mar 10, 2009 10:00 am    Post subject: Reply with quote

RC: Why is the Win32 epoch January 1, 1601?

"The Gregorian calendar operates on a 400-year cycle, and 1601 is the
first year of the cycle that was active at the time Windows NT was being
designed."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Mar 29, 2010 1:22 am    Post subject: Reply with quote

SO - NSDate dateFromString, how to parse ‘around’ UTC, GMT and User
locale?


"I parse some values from an xml file.

There is a @"25-12-2010'T'23:40:00"string with the time and date and there
is a string with the GMT offset like this @"+0200". So the above time is the
25. of December 23:40:00 in timeZone +0200 GMT."
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> General Programming All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group