Changed time getting function

time() always returned UTC. Changed to strftime ( "%s" ) to get local time.