setEmployeeTZByFilekey() Method

Table of Contents

  1. Function
  2. Syntax
  3. Parameters
  4. Return Value
  5. Sample Code
  6. Remarks
  7. Possible Errors
  8. Preferred Method
  9. Alternate Method
  10. Related Methods

Function

  • Sets an employee’s Time Zone Offset and Daylight Savings observance settings

Syntax

  • AeXMLBridge.setEmployeeTZByFilekey(Filekey, Offset, ObservesDST);

Parameters

  • Integer - employee filekey
  • Integer – time zone offset from corporate base (in hours)
  • Boolean – observes Daylight Savings Time

Return Value

  • None

Sample Code

C#

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
int filekey = 1234;                                                            
// using employee with filekey 1234

int tzOffset = -1;
// employee is one hour behind corporate base

bool observesDST = true;
// daylight savings time is observed

try
{
ws.setEmployeeTZByFilekey(filekey, tzOffset, observesDST);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

VB.Net

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Dim filekey As Integer = 1234
'using employee with filekey 1234

Dim tzOffset As Integer = -1
'employee is one hour behind corporate base

Dim observesDST As Boolean = True
'daylight savings time is observed

Try
ws.setEmployeeTZByFilekey(filekey, tzOffset, observesDST)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • Preferred way is use the maintainEmployeeDetail2 method and set the timezone and DST values
  • Employee’s Time Zone Offset is an integer offset value marking the deviation from the company’s resident time zone. This offset is not an offset from GMT
  • If the company is resident in the Central Time Zone, and the employee is also resident in the Central Time Zone, the employee’s Offset is zero (no offset)
  • If the company is resident in the Eastern Time Zone, and the employee is resident in the Central Time Zone, the employee’s Offset is -1 (one hour earlier)
  • The default values for new employees are an Offset of zero and True for Observes Daylight Savings. In most cases, these values never need to be changed

Possible Errors

  • Invalid employee filekey

Preferred Method

maintainEmployeeDetail2

Alternate Method

setEmployeeTZByIDNum

getEmployeeTZObservesDSTByIDNum
getEmployeeTZOffsetByIDNum

Back to Top