[cvsnt] cvsnt B2151+ - storing 'localtime' in the sessionLog database table

Joe Enfield joeenfield at hotmail.com
Sat Nov 18 14:20:00 GMT 2006


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


I've noticed that cvsnt converts the time from UTC to localtime before 
persisting to the database.
strftime(dt,sizeof(dt),"%Y-%m-%d %H:%M:%S",localtime(&d));

Using MS SqlServer this has the affect of showing the time in UTC when using 
clients to view the database table - as long as the Locale of the viewer is 
the same as the local of the server that commited the file.  If these 
Locales are different, then the time shown will be incorrect.
It also means that when searching for records, we have to manually offset 
UTC commit time by the Servers Locale before formatting a date to search.

The heart of the matter is that I don't think that the SessionLog table 
should store dates that have been offset by localtime.  Rather, they should 
simply store UTC, and allow the client to determine what Locale format 
should be displayed / Searched against - which could be the operating system 
local, or UTC - clients choice.

Is this change 'do-able'?

Thank you,
Joe E.









More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook