Skip to content

Commit

Permalink
Added %z to DateTime::strftime.
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
  • Loading branch information
supernovus authored and moritz committed Jul 18, 2010
1 parent e3ba686 commit a787329
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CREDITS
Expand Up @@ -329,6 +329,12 @@ U: tene
D: Minor Rakudo patches
E: tene@allalone.org

N: Timothy Totten
U: novus
D: Temporal (DateTime/Date) modifications
E: supernovus@gmail.com
W: http://huri.net/

N: Tyler Curtis
U: tcurtis
D: $*ARGFILES
Expand Down
3 changes: 2 additions & 1 deletion lib/DateTime/strftime.pm
Expand Up @@ -41,7 +41,8 @@ module DateTime::strftime {
'%' => { '%' },
'3' => { (($dt.second % 1)*1000).fmt('%03d') },
'6' => { (($dt.second % 1)*1000000).fmt('%06d') },
'9' => { (($dt.second % 1)*1000000000).fmt('%09d') }
'9' => { (($dt.second % 1)*1000000000).fmt('%09d') },
'z' => { $dt.timezone }
;
my $result = '';
while $format ~~ / ^ (<-['%']>*) '%' (.)(.*) $ / {
Expand Down

0 comments on commit a787329

Please sign in to comment.