Daylight Savings Time - 10.2.2

Post Reply
Buffa
Posts: 4
Joined: Tue Jul 22, 2014 9:09 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

Daylight Savings Time - 10.2.2

Post by Buffa »

Hello everyone. This is my first post here. I've gotten so much good information out of this forum, I finally decided to join. Hoping to help out and contribute here in the future.

My question is whether the dreaded Daylight Savings Time issue with TM1 chores happens to have been fixed in version 10.2.2 which is our current version. If you aren't aware of this issue, it's where a chore scheduled at 4:00am for example each night, will change automatically to 3:00am after the fall time change. In the spring, the saved time of the chore will move forward one hour. I assume most US developers who observe daylight savings time have banged their head against the wall a few times on this one, wondering why it continues to be an issue. It seems, starting with version 8, at least through 10.1.1. IBM's document on it doesn't mention 10.2 here:

http://www-01.ibm.com/support/docview.w ... wg21351307

I can't seem to find any 10.2.2 IBM documentation saying anything, and no luck searching online. I imagine not many are on this version yet, and those who are, have not gone through a time change yet. I think we are going to turn off our chores Saturday night and see if the saved times have changed Sunday morning to be safe. They step on each other otherwise, if the bug persists. Thanks!
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Daylight Savings Time - 10.2.2

Post by declanr »

There is nothing to fix. By default TM1 uses GMT (or UTC) but you can override that and have it pick up the time from the server its running on just add log4j.appender.S1.TimeZone=Local to your log properties file.
Declan Rodger
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Daylight Savings Time - 10.2.2

Post by Alan Kirk »

Buffa wrote:Hello everyone. This is my first post here. I've gotten so much good information out of this forum, I finally decided to join. Hoping to help out and contribute here in the future.

My question is whether the dreaded Daylight Savings Time issue with TM1 chores happens to have been fixed in version 10.2.2 which is our current version. If you aren't aware of this issue, it's where a chore scheduled at 4:00am for example each night, will change automatically to 3:00am after the fall time change. In the spring, the saved time of the chore will move forward one hour. I assume most US developers who observe daylight savings time have banged their head against the wall a few times on this one,
It's not just a problem for US developers.
Buffa wrote:wondering why it continues to be an issue. It seems, starting with version 8, at least through 10.1.1. IBM's document on it doesn't mention 10.2 here:

http://www-01.ibm.com/support/docview.w ... wg21351307

I can't seem to find any 10.2.2 IBM documentation saying anything, and no luck searching online. I imagine not many are on this version yet, and those who are, have not gone through a time change yet.
I hate to burst your bubble but the only reason that 10.2 isn't mentioned is... take a look at the "Modified Date" of the document.
Buffa wrote:I think we are going to turn off our chores Saturday night and see if the saved times have changed Sunday morning to be safe. They step on each other otherwise, if the bug persists. Thanks!
{Ahem}, step aside folks, I got this one.

According to IBM it's not a bug, it's a feature. It's a "feature" that I have been b!tching about ever since they made the change from scheduling in local time in version 7 (as you correctly note, version 8 was the first appearance of this abomination) and which, despite repeated requests, they show not the first inkling to provide a solution for because it's not something that will be able to be shown in a sales presentation unlike ugly but glossy, under-performing but superficially appealing Java applications.

The scheduling of chores in UTC (GMT as IBM would have it) makes sense in one, and exactly one, set of circumstances. That is where you have:
(a) Servers in multiple time zones; and
(b) You have chores on those different servers that need to occur in sequence with each other regardless of local times.

That might be, what, 5% of installations with the rest of us operating servers in a single timezone and running chores which are dependent on and relevant to the local time, not the universal time? 5%, if that? Good enough to inconvenience the rest of us twice per year.

I don't care that they offer chore scheduling in UTC as an option. I care that they don't offer local time as an option. :evil:

The options are:
(a) Do it manually twice per year;
(b) Get a third party tool like Vizier which (if I recall correctly) can bump multiple chores at the one time; or
(c) Write your own API-based tool to do the bouncing.

I went for option (c) which is why I don't complain about it as much any more. Doesn't mean that I'm happy about it though.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Daylight Savings Time - 10.2.2

Post by Alan Kirk »

declanr wrote:There is nothing to fix. By default TM1 uses GMT (or UTC) but you can override that and have it pick up the time from the server its running on just add log4j.appender.S1.TimeZone=Local to your log properties file.
I'll be happily corrected if I'm wrong but my understanding is that that only affects the time that's shown in the Server Log, not either the Transaction Log or in chore scheduling.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Daylight Savings Time - 10.2.2

Post by declanr »

Alan Kirk wrote:
declanr wrote:There is nothing to fix. By default TM1 uses GMT (or UTC) but you can override that and have it pick up the time from the server its running on just add log4j.appender.S1.TimeZone=Local to your log properties file.
I'll be happily corrected if I'm wrong but my understanding is that that only affects the time that's shown in the Server Log, not either the Transaction Log or in chore scheduling.
No you're absolutely right, I could have been sure I'd used it before but tested it a moment ago and apparently not.

You could always set 2 chores with just a single TI as the contained processes; that TI then checks the date to see whether your are in one time zone or the other and then decide whether to kick off the rest of the TIs or not accordingly.
I tend to do just such a thing for scheduling TIs to run at financial month ends etc and it wouldn't take much tweaking to get it to do this as well.
Declan Rodger
lotsaram
MVP
Posts: 3704
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Daylight Savings Time - 10.2.2

Post by lotsaram »

You know what it just twigged reading this thread that this is the reason people have been reporting cubes not getting updated and weird numbers. All the dammn chores have been running 1 hour earlier since Sunday therefore all the the processes using a text file data source are running BEFORE the ERP system has spat out the file and are therefore aborting, not always before the zero out mind (funnily enough SAP seems to have no issue with scheduling jobs in local time).

Excuse me while I go and kick myself, and thereafter go and reschedule some 30 odd chores.
... and let's not get started on the fantastic piece of UI that requires a chore to be deactivated before it can be edited ... and the fact that the edit option is right next to (and a mouse slip of only a few pixels away from) the run option. In the course of editing 30 chores its bound to happen.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Buffa
Posts: 4
Joined: Tue Jul 22, 2014 9:09 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

Re: Daylight Savings Time - 10.2.2

Post by Buffa »

Thanks guys! And so it goes, I guess. I appreciate the input.

The biannual time changes will always make me think of TM1, instead of the more soothing thought of changing seasons. :lol:
User avatar
mattgoff
MVP
Posts: 518
Joined: Fri May 16, 2008 1:37 pm
OLAP Product: TM1
Version: 10.2.2.6
Excel Version: O365
Location: Florida, USA

Re: Daylight Savings Time - 10.2.2

Post by mattgoff »

lotsaram wrote:Excuse me while I go and kick myself, and thereafter go and reschedule some 30 odd chores.
... and let's not get started on the fantastic piece of UI that requires a chore to be deactivated before it can be edited ... and the fact that the edit option is right next to (and a mouse slip of only a few pixels away from) the run option. In the course of editing 30 chores its bound to happen.
Ugh, same here after the US goes off DST this weekend. The last time this came up someone else said they liked having their chores move with local. Seems like a flag in the schedule tab would be pretty trivial. But I guess they were too busy making the v10 icons even less distinguishable than they were in v9. It is nearly impossible to see if a chore is enabled or not at a glance, and it's REALLY hard to differentiate the filter options in the cubeviewer. Luckily the positions are the same so muscle memory gets me halfway there. BTW, since I'm harping on all of my old gripes today, I'd like to point out that in order to deploy this upgrade I had to copy 4.6GB of installers to each of my five servers, and that doesn't even include the standalone client installer (and FP). :evil:

Matt

Edit: Forgot to mention that BitTorrent Sync is an awesome tool for dealing with these massive installers. You can create a private swarm which keeps files in target folder(s) synched. It's kind of like Microsoft SyncToy, but it uses bittorrent so it's a lot faster. Since it's folder-friendly, I was also able to get rid of the .tar.gz nonsense in advance. The license is a little vague about use in a commercial environment, but I contacted them to ask (making it clear it was for internal use in a company, not for repackage/resale/integration in a product), and they said it was fine.
Please read and follow the Request for Assistance Guidelines. It helps us answer your question and saves everyone a lot of time.
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Daylight Savings Time - 10.2.2 - Bittorrent Sync

Post by David Usherwood »

I am (perhaps was) a fan of BTSync - but 1.4 is a step backwards. Prettier looking but less reliable.
(Is there an echo round here ;) )
jcr55
Posts: 54
Joined: Tue May 08, 2012 3:58 pm
OLAP Product: TM1
Version: 9.5.2 FP2
Excel Version: Excel 2007

Re: Daylight Savings Time - 10.2.2

Post by jcr55 »

Alan Kirk:
.."Write your own API-based tool to do the bouncing. "

We also have to manually update our chores each spring and fall. Currently on 9.5.2.
Is there any way you could share that chore start time updating tool?

jeff.rice@genworth.com
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: Daylight Savings Time - 10.2.2

Post by rmackenzie »

Using the API for chores is a bit of a pain.

If your server is offline, you can use a bit of VBScript (or any other flavour you fancy) to update property 530 directly in all of the .cho files in your server. For chores that run daily, property 530 will determine the start time of the chore. The code looks for the line 530,YYYYMMDDHHIISS and updates the HH bit per the offset parameter.

To move the start time of all the chores on your server back by 1 hour, you would call:

Code: Select all

cscript d:\tm1\movechores.vbs "d:\tm1\your_server\your_data_folder" -1
Try it out on a dev server:

Code: Select all

Option Explicit

Const FOR_READING = 1
Const FOR_WRITING = 2
Const START_TIME_REGEX = "530,\d{14}\r"

Dim strDataFolder, intHourShift
Dim objFs, objFolder, objFile,  objStream
Dim strContent, objRegex, objMatch
Dim strOldStartTime, strOldHour, intNewHour, strNewStartTime

' parse arguments
' TM1 data folder
strDataFolder = Wscript.Arguments.Item(0)
' positive or negative integer to add or replace to current hour
intHourShift = Wscript.Arguments.Item(1)

' get access to data folder
Set objFs = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFs.GetFolder(strDataFolder)

' find .cho files
For Each objFile In objFolder.Files

	' skip non-chore files
	If UCase(objFs.GetExtensionName(objFile.Name)) = "CHO" Then
	
		' read full .cho file
		Set objStream = objFs.OpenTextFile(objFile.Path, FOR_READING)
		strContent = objStream.ReadAll
		objStream.Close
		
		' parse content to update start time
		Set objRegex = New RegExp
		With objRegex
			.Pattern = START_TIME_REGEX
			.IgnoreCase = True
			.Global = False
			Set objMatch = .Execute(strContent)
		End With
		
		' check for match and replace start time
		' note that we should have one match as global = false
		If objMatch.Count = 1 Then

			' add the shift to the current hour
			' mod 24 ensures range should be 00 to 23
			strOldStartTime = objMatch.Item(0)
			strOldHour = Mid(strOldStartTime, 13, 2)
			intNewHour = (CInt(strOldHour) + intHourShift) Mod 24
			If intNewHour < 10 Then
				strNewStartTime = Left(strOldStartTime, 12) & "0" & CStr(intNewHour) & Right(strOldStartTime, 5)
			Else
				strNewStartTime = Left(strOldStartTime, 12) & CStr(intNewHour) & Right(strOldStartTime, 5)
			End If
			
			' update content
			strContent = objRegex.Replace(strContent, strNewStartTime)
		
			'overwrite .cho file
			Set objStream = objFs.OpenTextFile(objFile.Path, FOR_WRITING)
			objStream.Write strContent
			objStream.Close

		End If
		
	End If
Next

' clean up
Set objFolder = Nothing
Set objFs = Nothing
Robin Mackenzie
jcr55
Posts: 54
Joined: Tue May 08, 2012 3:58 pm
OLAP Product: TM1
Version: 9.5.2 FP2
Excel Version: Excel 2007

Re: Daylight Savings Time - 10.2.2

Post by jcr55 »

Thank you rmackenzie!
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Daylight Savings Time - 10.2.2

Post by Alan Kirk »

Sorry, I hit a non-TM1 busy patch just recently and missed the later replies in this thread until I saw another one come in this morning.
mattgoff wrote: But I guess they were too busy making the v10 icons even less distinguishable than they were in v9. It is nearly impossible to see if a chore is enabled or not at a glance,
Damn straight. At that point the temptation to DIY sometimes becomes overwhelming. The following would never pass muster at IBM where the icons must be corporate themed, and the designers wouldn't know the expression "UX" if they were clubbed over the head with it:
AdminHelperChoresTab.jpg
AdminHelperChoresTab.jpg (399.05 KiB) Viewed 13108 times
If it wasn't occasionally true it wouldn't be funny. But if it was always true it wouldn't be funny either, just for a different reason. If it's approached from the point of view that "I have this one task, let's see if I can knock up an API based program for it" then yes, it may well look like that. (Though in reality the "Ongoing Development" phase of the chart could more honestly be labelled "playtime".) As you can probably guess from the above, that's not the approach that I took. I wrote an application which has some core API-related functionality. The functions were kept as generic as possible. I need a property of an object? That code's already there. I need to iterate a collection of objects? Same thing. Then I just build extra bits and pieces onto that as and when I need to. It skips a lot of the development time because the base code has already been developed, and unlike a certain 4 letter language starting with "J" the front end is ridiculously easy to build and hook the back end code to. Which also means that I get to where I want to be faster. Which also makes the rethinking phase less of a burden because I had long since thought out all of the things that I want this thing to do. Which also means that there is less temptation to spend time on the "ongoing development" phase. Once I get something working for a specific purpose then there is still other stuff to do.

And with a 4 hour commute every day, it's not like I'm short of time to do it, if I don't have other more important things to do. Which is not as often as I'd like.

Which is why:
jcr55 wrote:Alan Kirk:
.."Write your own API-based tool to do the bouncing. "

We also have to manually update our chores each spring and fall. Currently on 9.5.2.
Is there any way you could share that chore start time updating tool?
I'm afraid that I must decline. If this was just a module of code in a VBA workbook I might be OK to do that but I'm afraid that this goes way beyond that because I've put a LOT of work into this thing (on and off admittedly, and also as a combination of .Net learning and playtime also admittedly, but a lot of work nonetheless) over the last couple of years, to the extent that it falls into what I said here about sometimes exceeding the "crossing of palms with silver" point of development. Except that it's currently in no condition to sell either (as I said I just add in functionality as I need it) and may never be, since I have many fish and a very limited number of frypans. Still, I'm glad to see that Robin has given you a decent workaround; you do need to take the server down to use it but if you have a lot of chores it's probably worth it.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
jcr55
Posts: 54
Joined: Tue May 08, 2012 3:58 pm
OLAP Product: TM1
Version: 9.5.2 FP2
Excel Version: Excel 2007

Re: Daylight Savings Time - 10.2.2

Post by jcr55 »

Should have replied earlier, but anyway..
We have lots of chores, and we bounce all of our TM1 servers every Sunday anyway.
So using the VBS script provided as a starting point, we have implemented batch scripts that update the .cho files while the server is down.
Based on a parameter, it adjusts the cho start time as needed.
It worked great when starting DST here in the US in March.
Post Reply