Book: Footer using UTC time zone

Cheryl_Lamkin
New Contributor II

When I run a OneStream book, the time zone in the footer is in UTC, which is 5 hours different from my time zone CST.   However, if I run the individual cube views that are included in that book, the time zone is converted from UTC to CST.  How do I get my books to properly reflect the CST time zone in the footer of each page? 

Book in UTC time
Cheryl_Lamkin_0-1721671724324.png
Ran cube view from book afterward and it is in correct CST time
Cheryl_Lamkin_1-1721671731334.png

Thanks!

 

1 ACCEPTED SOLUTION

T_Kress
Contributor III

This is a known issue:  PF-3331.  I do not see this yet on Idea Stream but you could open a case and ask that your company be added to this known issue.

As a work around, you can use this dashboard extender rule on cube views:

Namespace OneStream.BusinessRule.DashboardStringFunction.XFR_Show_Est_timezone
	Public Class MainClass
		Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardStringFunctionArgs) As Object
			Try
				If args.FunctionName.XFEqualsIgnoreCase("TimeHelper") Then
					Dim now As DateTime = DateTime.UtcNow
					Dim easternzoneid As String = "Eastern Standard Time"
					Dim easternZone As TimeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById(easternZoneId)
					Dim convert As Date = TimeZoneInfo.ConvertTime(now, easternzone)

					Return convert.ToString
					
				End If

				Return Nothing
			Catch ex As Exception
				Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
			End Try
		End Function
	End Class
End Namespace

The reason it's pulling that time is because it uses the server time, which is UTC.   This was initially done so that when a book is run, users can convert to their local time.

If you set up a dashboard extender BR and go to the cube view's footer, and paste in the following:

XFBR(XFR_Show_EST_timezone, TimeHelper) EST

That will run all cube views in a book as ET.  The caveat with this work around is you have to pick one time zone, e.g. EST.

Also, if you search One Community for "Footer UTC" or "time zone" you will see other suggestions.

Teresa C. Kress
Principal Delivery Manager Partner Enablement | OneStream Software

View solution in original post

2 REPLIES 2

T_Kress
Contributor III

This is a known issue:  PF-3331.  I do not see this yet on Idea Stream but you could open a case and ask that your company be added to this known issue.

As a work around, you can use this dashboard extender rule on cube views:

Namespace OneStream.BusinessRule.DashboardStringFunction.XFR_Show_Est_timezone
	Public Class MainClass
		Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardStringFunctionArgs) As Object
			Try
				If args.FunctionName.XFEqualsIgnoreCase("TimeHelper") Then
					Dim now As DateTime = DateTime.UtcNow
					Dim easternzoneid As String = "Eastern Standard Time"
					Dim easternZone As TimeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById(easternZoneId)
					Dim convert As Date = TimeZoneInfo.ConvertTime(now, easternzone)

					Return convert.ToString
					
				End If

				Return Nothing
			Catch ex As Exception
				Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
			End Try
		End Function
	End Class
End Namespace

The reason it's pulling that time is because it uses the server time, which is UTC.   This was initially done so that when a book is run, users can convert to their local time.

If you set up a dashboard extender BR and go to the cube view's footer, and paste in the following:

XFBR(XFR_Show_EST_timezone, TimeHelper) EST

That will run all cube views in a book as ET.  The caveat with this work around is you have to pick one time zone, e.g. EST.

Also, if you search One Community for "Footer UTC" or "time zone" you will see other suggestions.

Teresa C. Kress
Principal Delivery Manager Partner Enablement | OneStream Software

Cheryl_Lamkin
New Contributor II

Hi Teresa,

Thanks so much for the response!  I was able to add a CST time zone using your dashboard extender rule.  I then went to Application Properties and changed "Show Date" to "False" which may be obvious to most, but I'm including that for the rookies like myself who ran the reports and wondered why it was showing two dates and times 🙂