Date manipulation: Difference between revisions
→{{header|Haskell}}: Replaced a functional call that is now deprecated
Alextretyak (talk | contribs) m (→{{header|11l}}) |
(→{{header|Haskell}}: Replaced a functional call that is now deprecated) |
||
Line 1,118:
=={{header|Haskell}}==
<lang haskell>import qualified Data.Time.Clock.POSIX as P
import qualified Data.Time.Format as F
-- UTC from EST
main :: IO ()
main = print t2
where
where t1 = readTime defaultTimeLocale▼
t1 =
"%B %e %Y %l:%M%P %Z"▼
F.parseTimeOrError
"March 7 2009 7:30pm EST"▼
True
t2 = posixSecondsToUTCTime $ 12*60*60 + utcTimeToPOSIXSeconds t1</lang>▼
{{Out}}
<pre>2009-03-08 12:30:00 UTC</pre>
=={{header|HicEst}}==
|