summaryrefslogtreecommitdiff
path: root/examples/time-xmlrpc-com.hs
blob: 38925f83e6edb20bbc96a48f0da8404fefe55916 (plain)
1
2
3
4
5
6
7
8
9
10
11
import Network.XmlRpc.Client
import System.Time

server = "http://time.xmlrpc.com/RPC2"

currentTime :: IO CalendarTime
currentTime = remote server "currentTime.getCurrentTime"

main = do
       t <- currentTime
       putStrLn (calendarTimeToString t)