Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I wanted to gives a good name for a variable date_in_(number of seconds since epoch format) I googled it and couldnt find anywhere the term to use.

Any ideas?

share|improve this question
2  
Simply epoch or unix_time? –  ott-- May 9 '13 at 14:43
    
The type of the variable should explain what it is (e.g., POSIX.1's time_t). –  Blrfl May 9 '13 at 14:47
    
@ott unix time, that's how it's known on wikipedia :). –  MrFox May 9 '13 at 15:17
    
Unix time is specifically seconds since the 1970-01-01 epoch. If that's your epoch, then do name it Unix time. –  MSalters May 9 '13 at 22:49
add comment

closed as too localized by Glenn Nelson, Yusubov, MichaelT, Robert Harvey, Martijn Pieters May 10 '13 at 0:59

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 2 down vote accepted

Well as Epoch depends on "when" it starts (http://en.wikipedia.org/wiki/Epoch_(reference_date) for a little reference) you could chose the name accordingly to your start.

I use to call it simply time, epoch or unixtime. Of course you shoud avoid ambiguities with other uses of word time in your code to allow anybody understand it.

So i would choose between:

date_in_time
date_in_epoch
date_in_unix_time
share|improve this answer
    
+1, date_in_unix_time seems to be the least ambiguous. –  FrustratedWithFormsDesigner May 9 '13 at 15:44
1  
Why not seconds_since_epoch? –  Dan Pichelman May 9 '13 at 16:49
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.