iphone sqlite NSDate bug -


I use core data in my iPhone app, but in some cases I use sqlite to access data I and I NSDT

  NSDT * now = [NSDT date]; NSCalendar * Calendar = [NSCalendar current calendar] ;; NSDateComponents * comp = [Calendar component: NSYearCalendarUnitDate: now]; [Comp set: 1]; [Comp setmonth: 1]; NSDT * year AGU = [Calendar date formatCompany: COMP]; NSPredicate * predicate = [NSPredicate predicateWithFormat: @ "Date '% @", Salg];  

This code works and selects the record from the beginning of the year, but if I use sqlite raw query

  NSDate * current = [NSDate date]; NSDateComponents * comps = [Gregorian Component: (NSDayCalendarUnit | NSMonthCalendarUnit | NSYearCalendarUnit) fromDate: Current]; [Set date: 1]; [Set Component Set: 1]; NSDT * yeardata = [Gregorian date format; Comps]; [Where inserted format: @ "datedate"; '% @', year old];  

I have a problem, the wrong date fixed by Records, Records in the core date How do I add dates to date 1 / 2008-01-01 in the year 1977? Maybe I was wrong in using NSDate in the query?

In some cases you will need to add the SQLite DB date to 31 years

from the book:. IPhone forensics: recovered Rena Evidence, Personal Data, and Corporate Assets On Calendar Events Up to Jonathan Zezierski:

, where standard Unix timestamps are used on the iPhone, unlike most timestamps, used here timestamp An RFC 822 timestamp represents the date 1977 to change the offset this time, set the actual RFC 822 timing and add 31 years.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -