dmwm / PHEDEX

CMS data-placement suite
8 stars 18 forks source link

posix Namespace: wrong mtime for files created less than one year ago #1019

Open nikmagini opened 8 years ago

nikmagini commented 8 years ago

The posix namespace parses the date incorrectly in 'ls -l' output if the file was created less than one year ago:

https://github.com/dmwm/PHEDEX/blob/master/perl_lib/PHEDEX/Namespace/posix/stat.pm#L71

The y_or_hm field is correctly interpreted as hour:minute. But then the year field in the t structure is left undefined, so timelocal defaults it to year 2000. The year should be set to current or last year as appropriate.