简体   繁体   English

在 Haskell 中获取系统时间的方法是什么?

[英]what is the way to get system 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 .如何使用 Haskell 获取系统时间

You can use getCurrentTime from Data.Time.Clock .您可以使用Data.Time.Clock中的getCurrentTime

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

Go through the above Doc. Go 通过上述文档。

System.Time provides functionality for clock times, including timezone information (ie, the functionality of "time.h", adapted to the Haskell environment). System.Time 提供时钟时间功能,包括时区信息(即“time.h”的功能,适用于 Haskell 环境)。 It follows RFC 1129 in its use of Coordinated Universal Time (UTC).它在使用协调世界时 (UTC) 时遵循 RFC 1129。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM