Differences From:
File
src/timeline.c
part of check-in
[d23b8ba62b]
- Update SQLite to the latest in CVS (version 3.6.4+). Add a configuration
option to show all times in UTC instead of localtime.
by
drh on
2008-11-01 20:48:52.
[view]
To:
File
src/timeline.c
part of check-in
[0b36f02f15]
- Make UTC time display the default. You can still set up a server to show
localtime but that requires changing a setting under setup/timeline.
by
drh on
2008-11-01 20:56:59.
[view]
@@ -668,16 +668,17 @@
** uses gmttime() instead. Thus by setting the timeline-utc property, we
** can get all localtimes to be displayed at UTC time.
*/
struct tm *fossil_localtime(const time_t *clock){
- static int once = 1;
- static int useUtc = 0;
- if( once ){
- useUtc = db_get_int("timeline-utc", 0);
- once = 0;
+ if( g.fTimeFormat==0 ){
+ if( db_get_int("timeline-utc", 1) ){
+ g.fTimeFormat = 1;
+ }else{
+ g.fTimeFormat = 2;
+ }
}
- if( useUtc ){
+ if( g.fTimeFormat==1 ){
return gmtime(clock);
}else{
return localtime(clock);
}
}