[cmake-developers] patch for cmake that adds a new timestamp command

Nils Gladitz gladitz at sci-vis.de
Fri Sep 28 02:28:25 EDT 2012


Why is TIMESTAMP misleading?

Per default it currently outputs year, month, day, hour, minute and second.
This includes both a date (a day on a calendar) as well as time (time of 
day).

"Timestamp" I'd define as both date and time bound to an event (here the 
call or the (sub-)command).

"Date" I'd consider inaccurate since it implies that there is no time 
resolution.

"Time" I'd say would be slightly more accurate since it has higher 
precision and it matches the naming in C (time_t, tm, strftime ...).

"DateTime" Is accurate and has precedence (e.g. SQL) but is (IMO) not as 
pretty.

To list them in order of personal preference this would for me give:
Timestamp, DateTime, Time, Date

Nils


On 09/27/2012 07:41 PM, Eric Noulard wrote:
> 2012/9/27 David Cole <david.cole at kitware.com>:
>> Hmmmm. Good idea.
>>
>> Should we add a new command for this? Or should it be a sub-command of
>> "string(" like RANDOM is?
>>
>> And... while we're at it, I've always thought we should add the
>> ability to get the creation/modified/access times from a file via the
>> CMake file command. If we allow getting the "current" time, we should
>> leverage some of the same transformation-to-string code in the file
>> command to get the various times associated with a file.
>>
>> What do other devs here think:
>> New command or string sub-command for this functionality?
> string sub-command for me, and agreed with Brad as well
> for the "namespace" thing.
>
> agreed with file(...) extension as well.
>
> that said isn't the "TIMESTAMP" misleading?
> shouldn't it be called "DATE" instead?
>
>
>


-- 
Nils Gladitz, B.Sc.
DICOM, Konnektivität und Entwicklung

Scivis wissenschaftliche Bildverarbeitung GmbH
Bertha-von-Suttner-Str. 5
D-37085 Göttingen
GERMANY
Handelsregister Nr. / Trade Register No. B3100 Göttingen
Geschäftsführer / Managing Directors Dr. Gernot Ebel, Dr. Uwe Engeland

Tel: 0049 (0)551 634181-28
E-Mail: gladitz at scivis.de
Web: www.scivis.de




More information about the cmake-developers mailing list