Back to product page

Timezone function


Determines if dates are shown in Local or UTC timezone.

Type

A Long value. If successful, 0 is returned, otherwise error as specified here

Syntax

  • C
long Sftp_GetTimezone(void *Sftp, TimezonesEnum *pVal);
long Sftp_SetTimezone(void *Sftp, TimezonesEnum newVal);
The Timezone(void *Sftp,TimezonesEnum *pVal, newVal) syntax has these parts:
void *SftpHandle of the created Sftp instance.
TimezonesEnum *pVal, newValA TimezonesEnum enumeration, as described in settings.

Remarks

The settings for value are:

Constant Value Description
ZoneLocal0 Time/Date is represented in local timezone.
ZoneUTC 1 Time/Date is represented in UTC.


The Timezone function is a client-side add-on (by default the SFTP protocol only works with UTC dates) that defines whether wodSFTP will represent dates in the Local timezone or in UTC/GMT. It is more convenient for dates to be represented in local time, but on rare occasions it is possible that the server or the local computer has its clock set incorrectly, causing our calculation of local->UTC->local conversion to be invalid.

This setting affects the ListAttributes, GetAttributes and SetAttributes functions. It does not affect the ListDir function because ListDir does not interfere with the contents of the directory, it simply provides data as it receives it from the server (as string data).

Platforms

Windows