wodSFTP API library - Timezone Property
      
 

Description

Determines if dates are shown in Local or UTC timezone.


Return type

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


Syntax

long Sftp_GetTimezone(void *Sftp, TimezonesEnum *pVal);
long Sftp_SetTimezone(void *Sftp, TimezonesEnum newVal);

The Timezone function syntax has these parts:

Part Description
void *Sftp Handle of the created Sftp instance.
TimezonesEnum *pVal, newVal A TimezonesEnum enumeration, as described in settings.

Settings

The settings for value are:

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

Remarks

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).