This tool converts dates to cocoa dates (number of seconds since Jan 1, 2001). This is useful if you want to know a numeric value to expect from the
-timeIntervalSinceReferenceDate
method of NSDate, or what to pass to
– (id)initWithTimeIntervalSinceReferenceDate:(NSTimeInterval)seconds
Note that this assumes you’re in timezone +0 (GMT). If you care about such things, you’ll need to account for it in your source code. You should probably account for the user’s current time zone if you want the displayed time to match a value you get from here.
To use: Just type in a new value in any of the boxes and press enter or tab or click somewhere and it should just update.
Update: Now includes Windows FILETIME representation.
Date (YYYY/MM/DD) :
Time (HH:MM:SS) :
Cocoa timeSinceReferenceDate (seconds) :
FILETIME:
Time (HH:MM:SS) :
Cocoa timeSinceReferenceDate (seconds) :
FILETIME:
2 replies on “Cocoa NSDate Calculator and Converter”
[…] * Timestamp. Para traducir este dato a una fecha “comprensible” es necesario saber que se encuentra en formato ” Cocoa NSDate” y corresponde al número de segundos desde el 1 de enero de 2001 (algo parecido al Epoch). Para traducirlo a una fecha real de forma muy sencilla, se puede usar, por ejemplo, la herramienta web blog.paddlefish.net/?page_id=90 […]
Thank you, this converter is very helpful!