end { tzs = ["UTC", "America/Sao_Paulo", "Asia/Istanbul"]; for (tz in tzs) { ENV["TZ"] = tz; # Expect these to not vary with $TZ since we are using %z intime = "1970-01-01T00:00:00-0400"; parsed = strptime(intime, "%Y-%m-%dT%H:%M:%S%z"); formatted = strftime(parsed, "%Y-%m-%dT%H:%M:%S%z"); print; print "TZ ", tz; print "intime ", intime; print "parsed ", parsed; print "formatted", formatted; } }