Re: How short can I make it
Re: How short can I make it
- Subject: Re: How short can I make it
- From: Doug McNutt <email@hidden>
- Date: Thu, 13 Oct 2011 14:14:08 -0600
At 15:29 -0400 10/13/11, Mark J. Reed wrote, and I snipped violently:
>Speaking of epoch time...RIP, Dennis M. Ritchie.
>Opps, sorry, miscounted!
>>9 digits? Not in decimal - epoch time broke 10 digits in 2001. As I type this it's 1,318,524,834. That's 8 digits in hexadecimal. Or 6 digits in base 36 (0,1,2,3,4,5,6,7,8,9,a,b,c,d,...,z)...
>>year part, if you don't care about it being readable, how about seconds since the Epoch (1970-01-01 00:00:00 UTC)?
>>That's just 9 digits, before doing anything with it.
>>Then convert it into hex ?
In OS 9 I do :
date -n
and get 3,401,358,784 which is the seconds count from Jan 0, 1904. (Commas added)
Of course, UNIX epoch time is based on Jan 0, 1970 which doesn't include my birth date! I have files that I still use and are dated as long ago as cy 1963.
Which epoch is the REAL one in OS neXt? Are HFS files dated on this OS 9 8500 properly sorted when they are copied to my OS neXt box?
So what is Apple's standard epoch? I know it changed file dates from local time to Zulu time about synchronously with the introduction of OS neXt, but just what is the whole truth as it applies to HFS files on floppy disks or images thereof? Is it the neXt version of UNIX or is it MacOS?
To keep it on topic. The OP can easily just disregard the first digit - trillions - and all would be fine for at least the life of his product..
But he should be very careful to keep AppleScript from treating the time value as a number as opposed to a string. The business of converting numbers bigger than 29 out of 32 bits to floating doubles could get him into real trouble. There is no such thing as an unsigned int in AppleScript.
--
Applescript syntax is like English spelling:
Roughly, though not thoroughly, thought through.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden