Penguin

Differences between version 18 and predecessor to the previous major change of TimeNotes.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 18 Last edited on Tuesday, March 21, 2006 7:19:43 pm by LawrenceDoliveiro Revert
Older page: version 17 Last edited on Tuesday, March 21, 2006 7:03:51 pm by LawrenceDoliveiro Revert
@@ -39,13 +39,20 @@
  <pre> 
  date --date="1970-01-01 ''<unix timestamp>'' secs UTC" 
  perl -e 'print localtime( ''<unix timestamp>'' ) . "\n") 
  perl -e 'print gmtime( ''<unix timestamp>'' ) . "\n") # for UTC 
+ /usr/lib/news/bin/convdate -c ''<unix timestamp>''  
  </pre> 
  
 Convert a time in localtime to a Unix timestamp:: 
  
- Use the mktime(3) function available in various programming languages. 
+ <pre>  
+ /usr/lib/news/bin/convdate -n ''<date string>''  
+ </pre>  
+  
+ (__convdate__ is part of the __inn__ package.)  
+  
+ Or use the mktime(3) function available in various programming languages. 
  
  <verbatim> 
  <?php 
  $ts = mktime(11, 49, 00, 10, 17, 2004); 
@@ -70,8 +77,10 @@
  TZ=Pacific/Auckland date 
  </verbatim> 
  
 Here the value of TZ is a filename path; if it doesn' begin with a __/__, then it is interpreted relative to the __/usr/share/zoneinfo__ directory (on most Linux distros). Multiple files in this directory with the same contents give different ways of specifying the same time zone; thus __NZ__ is a synonym for __Pacific/Auckland__. 
+  
+Note that setting __TZ__ in this way can also be used on other commands that show dates/times, such as ls(1), the abovementioned __perl__ and __convdate__ examples etc.  
 ---- 
  
 Excerpt from comp.risks 22.94: