Jump to content


Photo

MDTM conmmand and UTC time format


  • Please log in to reply
2 replies to this topic

#1 Nikeware

Nikeware
  • Members
  • 27 posts
  • Interests:
    Diff Commander - folders compare and merge tool<br />Visual Comparer - text files compare and merge tool

Posted 22 July 2006 - 10:42 PM

Dear, Support!

First, common syntax for MDTM command:
MDTM YYYYMMDDHHMMSS somefile.txt

Now, questions :unsure: .

1. The YYYYMMDDHHMMSS parameter is time in UTC format?

2. SetFileTime() SmartFTP function does some UTC<->local_time conversions or it simply execute the MDTM command?

Regards,
Nikolai

#2 mb

mb

    Developer

  • Administrators
  • 11520 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 22 July 2006 - 10:52 PM

Hello ...

>1
According to the RFC/Draft the MDTM value shall be in UTC. As far as I remember only some old Serv-U versions didn't follow the RFC/Draft.

>2
No conversation is done. The SetFileTime() function expects the time in UTC.

As a general rule, your application should internally use UTC time. And the time should be converted to the system/local time when displayed in the UI.

Regards,
-Mat

#3 Nikeware

Nikeware
  • Members
  • 27 posts
  • Interests:
    Diff Commander - folders compare and merge tool<br />Visual Comparer - text files compare and merge tool

Posted 22 July 2006 - 11:37 PM

Hello, Mat!

Thank you for your quick reply!

As a general rule, your application should internally use UTC time. And the time should be converted to the system/local time when displayed in the UI.

It is my most favorite rule :unsure:

Regards,
Nikolai




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users