How to get the current UTC time in Haskell?

2.3k views Asked by At

i want to use system time in my code for having the record of time when the data is captured from the user interface.how to get system time using Haskell.

2

There are 2 answers

0
Emily On BEST ANSWER

You can use getCurrentTime from Data.Time.Clock.

0
Madhuchhanda Mandal On

http://hackage.haskell.org/package/old-time-1.1.0.3/docs/System-Time.html

Go through the above Doc.

System.Time provides functionality for clock times, including timezone information (i.e, the functionality of "time.h", adapted to the Haskell environment). It follows RFC 1129 in its use of Coordinated Universal Time (UTC).