• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How short can I make it
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How short can I make it


  • Subject: Re: How short can I make it
  • From: "Mark J. Reed" <email@hidden>
  • Date: Thu, 13 Oct 2011 17:42:22 -0400

OS X uses the standard UNIX epoch (0 == Jan 1, 1970, 00:00:00 GMT), as you can see by typing 'date +%s' at the command line.

On Thu, Oct 13, 2011 at 4:14 PM, Doug McNutt <email@hidden> wrote:
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



--
Mark J. Reed <email@hidden>

 _______________________________________________
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

References: 
 >How short can I make it (From: Paul Abney <email@hidden>)
 >Re: How short can I make it (From: David Ferrington <email@hidden>)
 >Re: How short can I make it (From: "Mark J. Reed" <email@hidden>)
 >Re: How short can I make it (From: David Ferrington <email@hidden>)
 >Re: How short can I make it (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: INDESIGN: Coercing a String to a Constant
  • Next by Date: Re: Reading IPTC and EXIF information from photos
  • Previous by thread: Re: How short can I make it
  • Next by thread: Re: How short can I make it
  • Index(es):
    • Date
    • Thread