@@ -321,52 +321,6 @@ def convert_hris_to_cis_profiles(self, hris_data, cis_users_by_user_id, cis_user
321321 returns: list of cis_profile.Profile
322322 """
323323
324- def tz_convert (hris_tz ):
325- tzmap = {
326- "GMT United Kingdom Time (London)" : "UTC+0000 Europe/London" ,
327- "GMT Western European Time (Casablanca)" : "UTC+0100 Africa/Casablanca" ,
328- "GMT+01:00 Central European Time (Amsterdam)" : "UTC+0200 Europe/Amsterdam" ,
329- "GMT+01:00 Central European Time (Berlin)" : "UTC+01:00 Europe/Berlin" ,
330- "GMT+01:00 Central European Time (Oslo)" : "UTC+01:00 Europe/Oslo" ,
331- "GMT+01:00 Central European Time (Paris)" : "UTC+01:00 Europe/Paris" ,
332- "GMT+01:00 Central European Time (Prague)" : "UTC+01:00 Europe/Prague" ,
333- "GMT+01:00 Central European Time (Stockholm)" : "UTC+01:00 Europe/Stockholm" ,
334- "GMT+02:00 Eastern European Time (Athens)" : "UTC+02:00 Europe/Athens" ,
335- "GMT+02:00 Eastern European Time (Bucharest)" : "UTC+02:00 Europe/Bucharest" ,
336- "GMT+02:00 Eastern European Time (Helsinki)" : "UTC+02:00 Europe/Helsinki" ,
337- "GMT+02:00 South Africa Standard Time (Johannesburg)" : "UTC+02:00 Africa/Johannesburg" ,
338- "GMT+03:00 East Africa Time (Nairobi)" : "UTC+03:00 Africa/Nairobi" ,
339- "GMT+03:00 Moscow Standard Time (Moscow)" : "UTC+03:00 Europe/Moscow" ,
340- "GMT+05:00 Pakistan Standard Time (Karachi)" : "UTC+05:00 Pakistan/Karachi" ,
341- "GMT+05:30 India Standard Time (Kolkata)" : "UTC+05:30 Asia/Kolkata" ,
342- "GMT+07:00 Western Indonesia Time (Jakarta)" : "UTC+07:00 Asia/Jakarta" ,
343- "GMT+08:00 Australian Western Standard Time (Perth)" : "UTC+08:00 Australia/Perth" ,
344- "GMT+08:00 China Standard Time (Shanghai)" : "UTC+08:00 Asia/Shanghai" ,
345- "GMT+08:00 Taipei Standard Time (Taipei)" : "UTC+08:00 Asia/Taipei" ,
346- "GMT+09:00 Japan Standard Time (Tokyo)" : "UTC+09:00 Asia/Tokyo" ,
347- "GMT+10:00 Australian Eastern Standard Time (Brisbane)" : "UTC+10:00 Australia/Brisbane" ,
348- "GMT+12:00 New Zealand Time (Auckland)" : "UTC+12:00 Pacific/Auckland" ,
349- "GMT-03:00 Argentina Standard Time (Buenos Aires)" : "UTC-0300 America/Buenos_Aires" ,
350- "GMT-03:00 Brasilia Standard Time (Recife)" : "UTC-0300 America/Recife" ,
351- "GMT-04:00 Atlantic Time (Halifax)" : "UTC-0400 America/Halifax" ,
352- "GMT-05:00 Eastern Time" : "UTC-0500 US/Eastern" ,
353- "GMT-06:00 Central Standard Time (Regina)" : "UTC-0600 America/Regina" ,
354- "GMT-06:00 Central Time (Chicago)" : "UTC-0600 America/Chicago" ,
355- "GMT-06:00 Central Time" : "UTC-0600 US/Central" ,
356- "GMT-07:00 Mountain Time" : "UTC-0700 US/Mountain" ,
357- "GMT-08:00 Pacific Time (Los Angeles)" : "UTC-0800 America/Los_Angeles" ,
358- "GMT-08:00 Pacific Time (Tijuana)" : "UTC-0800 America/Tijuana" ,
359- "GMT-08:00 Pacific Time" : "UTC-0800 US/Pacific" ,
360- }
361- try :
362- tzmap [hris_tz ]
363- except KeyError :
364- logger .warning (
365- "Unknown timezone in workday, defaulting to UTC. Timezone from HRIS was" " {}." .format (hris_tz )
366- )
367- return "UTC+0000 Europe/London"
368- return tzmap [hris_tz ]
369-
370324 def cost_center_convert (cc ):
371325 """
372326 Cost centers can have decimal points
@@ -427,7 +381,7 @@ def strbool_convert(v):
427381 p .primary_email .signature .publisher .name = "hris"
428382 p .primary_email .metadata .last_modified = ts_now
429383
430- p .timezone .value = tz_convert ( hruser .get ("Time_Zone" ) )
384+ p .timezone .value = hruser .get ("Time_Zone" )
431385 p .timezone .signature .publisher .name = "hris"
432386 p .timezone .metadata .display = "staff"
433387 p .timezone .metadata .last_modified = ts_now
0 commit comments