<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>17 Nov 2015 05:16:00 Z</lastBuildDate><pubDate>17 Nov 2015 05:16:00 Z</pubDate><description>I wonder if using UTC in database is good idea compare to localtime ?&#13;
&#13;
currently i working on andrroid app which will use mysql database and sqlite .&#13;
&#13;
i found that on mysql internally store datetime in UTC but present in localtime .&#13;
when I run "select now();" will return local time and table with field default CURRENT_timestamp(6) will show localtime&#13;
&#13;
but on sqlite , the 'now' will return UTC . this cause table with field default current_timestamp will show UTC .&#13;
&#13;
in order to not cause confuse in long run , I decide to change the mysql default timezone to UTC .&#13;
&#13;
but there's one problem show up . because mysql and sqlite now both UTC which mean every time i store/ retrieve datetime , I must do convert using DateTimeLocalToUTC() / DateTimeUTCToLocal() . which i feel more work to do&#13;
&#13;
is there a better solution ? , any suggestion ?</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/54979-wm20-android-utc-localtime-database/read.awp</link><title>[wm20-android] UTC vs localtime in database ?</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster></channel></rss>
