On 2014-11-19 20:04, Michael Van Canneyt wrote:
> If you need to store a timestamp, use the ISO 8601 format or RFC 3339 (or is 
> it 3999?).

I can't agree more!!


Snippet from tiOPF code

  { Summary of ISO 8601  http://www.cl.cam.ac.uk/~mgk25/iso-time.html }
  cIntlDateTimeStor = 'yyyymmdd"T"hhnnss';    // for storage
  cIntlDateTimeDisp = 'yyyy-mm-dd hh:nn:ss';  // for display
  CIntlDateDisp     = 'yyyy-mm-dd';  // for display


See tiIntlDateDispAsDateTime(), tiIntlDateStorAsDateTime() in tiOPF's
tiUtils.pas unit.


I even store TDateTime data as cIntlDateTimeStor formatted strings in
databases. Never had an issue with date conversions since.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to