hsmisc-1.1: A collection of miscellaneous modules

Safe HaskellSafe-Inferred
LanguageHaskell98

HsMisc.Data.TimeStamp

Description

Functions to prepend the current time to a string. Handy convenience functions for logging.

Examples:

tsL "foo"
tsZ "foo"
tsLFmt "%B %e, %Y :  " "bar"
tsUFmt "%c " "baz"

you'd get:

"2009-06-07 01:53:22 EDT> foo"
"2009-06-07T13:43:23Z> foo"
"June  7, 2009 :  bar"
"Sun Jun  7 13:15:41 UTC 2009 baz"

Synopsis

Documentation

tsLFmt Source

Arguments

:: String

Date format string

-> String

String onto which date will be prepended

-> IO String 

Prepend the time right now onto the supplied string in the format specified by the format string. Your local time zone. For formatting string options see Data.Time.Format

tsUFmt Source

Arguments

:: String

Date format string

-> String

String onto which date will be prepended

-> IO String 

Prepend the time right now onto the supplied string in the format specified by the format string. Universal time. For formatting string options see Data.Time.Format

tsL Source

Arguments

:: String

String onto which date will be prepended

-> IO String 

Prepend the time right now onto the supplied string. Your time zone. Time is in a clear, sortable format like: 2009-06-04 17:57:13 EDT>

tsU Source

Arguments

:: String

String onto which date will be prepended

-> IO String 

Prepend the time right now onto the supplied string. Universal time. Time is in a clear, sortable format like: 2009-06-04 21:57:13 UTC>

tsZ Source

Arguments

:: String

String onto which date will be prepended

-> IO String 

Prepend the time right now onto the supplied string. Universal time. Time is in an ISO 8601 format, zero UTC offset or Zulu time: 2009-06-04T21:57:13Z>