• 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
wrong date value from safari's lastVisitedDate in History.plist
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wrong date value from safari's lastVisitedDate in History.plist


  • Subject: wrong date value from safari's lastVisitedDate in History.plist
  • From: Ben Dougall <email@hidden>
  • Date: Tue, 21 Dec 2004 14:31:29 +0000

i can't work this out. i'm accessing safari's History.plist file and looking at the lastVisitedDate items which are in the number of seconds since 00:00:00.0 1st jan 2001 format (about safari's lastVisitedDate format: <http://docs.info.apple.com/article.html?artnum=108017>). there's a webpage that's recorded in my history file that i know was visited on Monday 20th --- and so does safari (that is, the page in question is in the correct dated folder in safari's history display). but when i access this data via my code, the date/time is in the 21st rather than 20th. why is my code getting 21st when the correct date (and the date that safari is getting for it) is the 20th?

NSString *stringFromLastVisitedDate = @"125323011.4";
NSDate *d = [[NSDate alloc] initWithTimeIntervalSinceReferenceDate:[stringFromLastVisitedDate doubleValue]];
NSLog(@"\nstring: %@\nd: %@ \ndesc: %@", stringFromLastVisitedDate, d, [d description]);


prints:

string: 125323011.4
d:      <CFDate 0x5cc60 [0xa01303fc]>{time = 125323011}
desc:   2004-12-21 11:56:51 +0000

the printed date is the 21st but safari puts this item in the 20th folder (which is the correct one). the stringFromLastVisitedDate is definitely the one corresponding to the item in question. the above technique i'm using correctly gets dates/times of just recently visited pages, so i've got a feeling this isn't even a cocoa question but a safari thing -- it's doing something extra maybe?

any ideas?

thanks, ben.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: wrong date value from safari's lastVisitedDate in History.plist
      • From: Ben Dougall <email@hidden>
  • Prev by Date: Re: Renaming files?
  • Next by Date: Value transformers and app delegates
  • Previous by thread: RE: Re: Midisport and sysex
  • Next by thread: Re: wrong date value from safari's lastVisitedDate in History.plist
  • Index(es):
    • Date
    • Thread