Navigation Menu

Skip to content

Commit

Permalink
just append the Z
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 23, 2014
1 parent ea12f3e commit 51f9346
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

5.33 2014-08-23
5.33 2014-08-24
- Improved Mojo::Date to be able to handle higher precision times.
- Improved Mojo::ByteStream performance.

Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Date.pm
Expand Up @@ -62,7 +62,7 @@ sub to_datetime {
my ($s, $m, $h, $day, $month, $year) = gmtime(my $epoch = shift->epoch);
my $str = sprintf '%04d-%02d-%02dT%02d:%02d:%02d', $year + 1900, $month + 1,
$day, $h, $m, $s;
return $epoch =~ /\.(\d+)$/ ? "$str.$1Z" : "${str}Z";
return $str . ($epoch =~ /(\.\d+)$/ ? "$1Z" : 'Z');
}

sub to_string {
Expand Down

0 comments on commit 51f9346

Please sign in to comment.