home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / gnu / emacs / help / 5286 < prev    next >
Encoding:
Text File  |  1993-01-07  |  1.6 KB  |  36 lines

  1. Path: sparky!uunet!stanford.edu!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!news.bbn.com!news.bbn.com!map
  2. From: map@BBN.Com (Mike Patton)
  3. Newsgroups: gnu.emacs.help
  4. Subject: What timezone am I in?
  5. Date: 7 Jan 93 13:23:29
  6. Organization: Bolt Beranek and Newman, Cambridge, MA 02138 USA
  7. Lines: 23
  8. Distribution: gnu
  9. Message-ID: <MAP.93Jan7132329@songlines.BBN.Com>
  10. Reply-To: Incoming Replies <MAP=Reply@BBN.Com>
  11. NNTP-Posting-Host: songlines.bbn.com
  12.  
  13. I need some way in a piece of Emacs Lisp I'm writing to determine
  14. details of the date and time...  The only thing I've found so far is
  15. the function (current-time-string), which contains all the info that I
  16. need _except_ the timezone.  I can use either the abbreviation or
  17. (better) the GMT offset, or (best) both.  Does anyone know a way to
  18. determine this from Emacs Lisp.
  19.  
  20.     -Mike Patton
  21.  
  22. P.S.  A side comment, I use (current-time-string) and extract
  23. substrings from specific character positions.  The documentation for
  24. (current-time-string) doesn't seem to promise that the format won't
  25. change in future releases (I expect it won't, but if it does, the code
  26. breaks and doesn't realize it).  Is there a better function for this
  27. part as well?  Ideally the whole thing might best be done with a
  28. function that returns a list or vector whose elements match those of a
  29. struct tm in C.
  30.  
  31. P.P.S.  I'd prefer to use functions from the base release and NOT to
  32. have the code depend on other packages, unless a really small piece
  33. can be extracted to include with my release, as the code is going to
  34. be used by some relatively novice emacs users who won't be up on
  35. getting packages from all over the net
  36.