UFN_TIMEZONEENTRY_GETSYSTEMDEFAULT

Returns the ID of the system default time zone

Return

Return Type
uniqueidentifier

Definition

Copy


create function dbo.UFN_TIMEZONEENTRY_GETSYSTEMDEFAULT()
returns uniqueidentifier
with execute as caller as
begin
    declare @TIMEZONEENTRYID uniqueidentifier

    select top 1 
        @TIMEZONEENTRYID = INTERNATIONALIZATIONINFO.DEFAULTTIMEZONEENTRYID
    from
        dbo.INTERNATIONALIZATIONINFO        

    if @TIMEZONEENTRYID is null
        select @TIMEZONEENTRYID = ID from dbo.TIMEZONEENTRY where NAME = 'Eastern Standard Time'        

    return @TIMEZONEENTRYID
end