arjun a
arjun a

Reputation: 161

How to get the current UTC time in Haskell?

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.

Upvotes: 2

Views: 2935

Answers (2)

Madhuchhanda Mandal
Madhuchhanda Mandal

Reputation: 927

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).

Upvotes: 1

Emily
Emily

Reputation: 1096

You can use getCurrentTime from Data.Time.Clock.

Upvotes: 5

Related Questions