[Cdash] Timestamps
Julien Jomier
julien.jomier at kitware.com
Tue Apr 22 15:27:22 UTC 2008
Hi Tobias,
CDash stores everything in UTC time and display it according to the
timezone of the server. When CDash receives a build it converts the
current timestamp to UTC.
The main issue is that PHP doesn't know if EST is the American or
Australian Timezone. If I recall correctly CTest uses the C++
implementation of time. One option would be to set your client machines
to AEST instead of EST, but I don't know how easy it would be.
As Stuart suggested, we have started to send UTC timestamps (actually
Unix timestamp)in the new version of CTest as part of the submission.
If you are willing to upgrade to CMake 2.6 (coming out next week) and
CDash 1.0 (coming out next week as well), then we should have the
timestamp working.
Julien
Tobias Kaupp wrote:
> Hi all,
>
> we've setup a dashboard here in Australia. Everything worked nicely out of the
> box. However, we're totally confused about how the timestamps work. Here's an
> example of an experimental build:
>
> ===============
> $ tkaupp at hemp:~/svn/gearbox/build$ date
> Thu Apr 17 16:14:10 EST 2008
>
> #This is my local time in Sydney. EST is actually AEST (Eastern Standard Time
> #for Australian time zones), not the North American EST.
> ===============
>
> =====================
> tkaupp at hemp:~/svn/gearbox/build$ ctest -D Experimental
> Site: hemp
> Build name: Linux-g++
> Create new tag: 20080417-0614 - Experimental
>
> #This seems to be UTC, right?
> =====================
> ...
> =====================
> Submit files (using http)
> Using HTTP submit method
> Drop site: http://cdash.acfr.usyd.edu.au/submit.php?project=Gearbox
> Uploaded: /home/tkaupp/svn/gearbox/build/Testing/20080417-0614/Build.xml
>
> Uploaded: /home/tkaupp/svn/gearbox/build/Testing/20080417-0614/Configure.xml
> Uploaded: /home/tkaupp/svn/gearbox/build/Testing/20080417-0614/Test.xml
> Using HTTP trigger method
> Trigger site:
> http://cdash.acfr.usyd.edu.au/cgi-bin/Submit-Random-TestingResults.cgi
> Dart server triggered...
> Submission successful
> =====================
>
>
> Here's my Build.xml. It says EST here:
>
> ===================================================
> <?xml version="1.0" encoding="UTF-8"?>
> <Site BuildName="Linux-g++" BuildStamp="20080417-0614-Experimental"
> Name="hemp" Generator="ctest2.4-patch 8">
> <Build>
> <StartDateTime>Apr 17 16:14 EST</StartDateTime>
> <BuildCommand>/usr/bin/make -i</BuildCommand>
> <Log Encoding="base64" Compression="/bin/gzip">
> </Log>
> <EndDateTime>Apr 17 16:14 EST</EndDateTime>
> <ElapsedMinutes>0</ElapsedMinutes></Build>
> </Site>
>
> ==================================================
>
> Then, on the actual website, the submission shows up with timestamp:
> 2008-04-18 07:14:00 EST (see
> http://cdash.acfr.usyd.edu.au/index.php?project=Gearbox&date=20080418).
> Furthermore, the webpage only displays the result much later (but it receives
> it straight away as indicated by the Submissions column on the index.php
> page).
>
> I looked through the php code and noticed a comment about Australian timestamp
> not being recognised. It also seems that AEDT is expected from the XML file
> which is not generated properly by ctest:
>
> ==================================
> /** Return timestamp from string
> * \WARNING this function needs improvement */
> function str_to_time($str,$stamp)
> {
> $str = str_replace("Eastern Standard Time","EST",$str);
> $str = str_replace("Eastern Daylight Time","EDT",$str);
>
> // For some reasons the Australian time is not recognized by php
> // Actually an open bug in PHP 5.
> $offset = 0; // no offset by default
> if(strpos($str,"AEDT") !== FALSE)
> {
> $str = str_replace("AEDT","UTC",$str);
> $offset = 3600*11;
> }
> ==================================
>
> I also tried nightly builds with "set(CTEST_NIGHTLY_START_TIME "04:00:00
> AEDT")" but the Build.xml shows EST again (as above). I can send you a full
> record of this if you like.
>
> What we'd like to see is that submissions show up on the webpage straight away
> with a build timestamp in local time (AEST or AEDT I guess).
>
> I stopped tracking the problems down at this point. I haven't checked entries
> in the actual MySQL database. We're running CDash version 0.8.
>
> Your help with this would be appreciated. Thanks!
>
> Cheers, Tobias
>
More information about the CDash
mailing list