KnpLabs / Gaufrette

PHP library that provides a filesystem abstraction layer − will be a feast for your files!
http://knplabs.github.io/Gaufrette
MIT License
2.47k stars 355 forks source link

Wrong creation year of file #693

Closed KristinaMikhajlova closed 1 year ago

KristinaMikhajlova commented 1 year ago

When we read file creation/modification date which is stored on linux server sometimes we get wrong year (+1).

Example: today is 18-04-2023, file was created 01-12-2022, final date => 01-12-2023, not 01-12-2022.

This refers to the peculiarities of Unix systems to show the year only for files older than half a year

PedroTroller commented 1 year ago

Hi. Can you give details? Which version are you using? Which adapter (the local one I think)?

KristinaMikhajlova commented 1 year ago

Hi! v0.7.1, ftp adapter

PedroTroller commented 1 year ago

Version 0.7.1 does not exists for knplabs/gaufrette lib, I think this is the version of the bundle. By the way, your issue is weird because the Ftp adapter is using the native ftp_mdtm php function... without other logic (https://github.com/KnpLabs/Gaufrette/blob/v0.11.1/src/Gaufrette/Adapter/Ftp.php#L189). Are you using ftp adapter or the phpseclib-sftp one ?

PedroTroller commented 1 year ago

Hi @KristinaMikhajlova. We haven't heard from you, I hope your problem is solved. If you have any information for us, please feel free to add a comment. If the problem persists, don't hesitate to reopen this issue. In the meantime, I'm closing it.