Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003849OCamlotherlibspublic2005-11-08 15:152016-12-07 16:39
Assigned To 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003849: strftime/strptime and asctime
DescriptionFull_Name: Joshua Smith
Version: 3.09
OS: Linux
Submission from: (

I would like to have strftime/strptime and asctime added into the Unix module.
This functionality exists in non-standard modules but it would be nice to have a
more complete Unix module.

TagsNo tags attached.
Attached Files

- Relationships
parent of 0003851acknowledged strftime/strptime (followup to 0003849
Not all the children of this issue are yet resolved or closed.

-  Notes
administrator (administrator)
2005-11-16 17:18

see also PR#3851
newacct (reporter)
2011-08-10 08:35

Yeah even the C90 standard library has asctime() and ctime(); why doesn't OCaml? Although you can convert between time and struct tm types, there is no way to get any of those into a string to display in OCaml, which is really silly.
warwick (reporter)
2012-10-29 13:28

It'd be good to even have a basic time-to-string function such as asctime (though strftime/strptime would be ideal). These functions would be a handy addition to the Unix module.

Alternatively it could be good to add to the Printf module so that it can display floating point numbers (seconds since 1 Jan 1970) as date/times. This would be similar to Java, and quite useful:
%tY => year
%tm => month
%td => day
%tF => ISO 8601 date

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
2005-11-29 13:11 doligez Relationship added parent of 0003851
2011-08-10 08:35 newacct Note Added: 0006087
2012-10-29 13:28 warwick Note Added: 0008354
2016-12-07 16:39 shinwell Category OCaml general => OCaml otherlibs
2016-12-07 16:39 shinwell Description Updated View Revisions
2017-02-23 16:42 doligez Category OCaml otherlibs => otherlibs

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker