-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

And in addition, the TZ offset might be handy to convert to UTC.  Local
time is locally determined while UTC is constant, and other local
offsets can be applied to display time in local terms.
For example, EST is UTC-5; EDT is UTC-4; PST is UTC-8; PDT is UTC-7;
During WWII there was a ``War Time''.  Some countries have a half-hour
offset in addition to the hour offset, so 2010-09-03T09:10:12+4:30 is a
valid time.  It's _all_ politics; this makes it subject to the whim of
each government.  So, in addition to the half-hour offsets, time-zone
offsets may change.  Also, the determination of Daylight Savings time
varies by country and can correspondingly change.  UTC is best.  That's
the reason Unix uses seconds since 1970.  I don't know what they do for
dates before that; if the time can have a negative offset (proleptic)
then all is well.

Hmmm...Ask me the time; I'll give you my watch. :-)

Ted

On 09/04/2010 08:00 AM, Kristoffer Danielsson wrote:
> 
> Definitely #1 if iOS supports 64-bit unix timestamps. You also store the time 
> of the day, which may prove useful later on.
> 
>  
> 
> #2 is non-standard. No time value.
> 
> #3 has no time value. '2010-09-03T01:23:45' (ISO 8601) would be an option 
> though.
> 
> #4 gives room for mistakes; the year may be interpreted as the day.
> 
>  
>> Date: Sat, 4 Sep 2010 20:31:00 +0900
>> From: mikez...@yahoo.co.jp
>> To: sqlite-users@sqlite.org
>> Subject: [sqlite] Which data type is better for date?
>>
>> I try to convert data to SQLite3 for iPad, please give me some detail
>> suggestion.
>>
>> I think that I can save date value as below to SQLite3, I want to know
>> which is better, or anything else if you have good idea.
>>
>> 1. integer as seconds since 1970
>> 2. integer as days since 1970
>> 3. string as '2010-09-03'
>> 4. string as '10-09-03'
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>                                         
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

- -- 
+-----------------------------------------------------------------+
| 3.14159 26535 89793 23846 26433 83279 50288   May the Spirit    |
|   41971 69399 37510 58209 74944 59230 78164    of pi spread     |
|   06286 20899 86280 34825 32411 70679 82148  around the world.  |
|   08651 32823 06647 09384 46095 50582 ...      PI VOBISCUM!     |
+-----------------------------------------------------------------+

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJMgkaKAAoJED4OSd2wf5qud7kQAIeQXUY/A+AQgj5lduv8v2fu
+nbpSe5YxlfLSG8BdQiMGBcvDSvqXwzIFuW7epPO9LO7uDQFpkEAUnOoQBVdtP53
NrsYt9mXtniXe5y8o7wI4pvZv9kW4r9vL4+ahwWYROT/UaCJOwPGgvpf9/S8zbp+
VMpO71I7ZImgMh70976EAvJUx3e/4Eha5S/vVJiG/REFnG6zibI6dssEhDQBlBsW
ePBEQE1Rif7eJB5NVEfpIKauBeI0uWL/FW1+omwcTGPM6c1WnRIdz5gKt2VAgNV0
C1y0MO/82qAt1EQEgYtm1ft8nVUoAwIg8sdVPZlrVHqQq++x065NdkipcqbhsTA5
/lBj0rAKhntNDE6BYbxEhYs+3LAgi+d42+Sq/kY4JW65eiaffzzKHu+/LSvg1Vj8
291pG18RfsSxy7jqyplOpDBkybaITgmyY7Lhi/QBy8YDccqiWPWAVYf5Kjfe96X2
wW93RiGe5efRHUI2H2TLoPwy73O3rkzV9Q35oPhx0TFygRuxCDKZTSWvg4vROpHD
NBJFLoMhtge1tTy1VCiEiPSUEX9BrxaEuaxjDhm2rpvP55zDQXLEcMtEIt6ur21w
EZ+3xrUMZkwc5OjzD6US1It+c7mFUfz2SKFZQPNo8Jvo5gMPxhJ3PpjD6ySTasnC
k+kTlA4gbe8s/CuciObC
=8GoS
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to