Maximo get current date time of different time zone
In Maximo we can get current date time of different time zone using Java Customization/Automation scripts.
Lets see automation script approach to get time of different time zone.
Step1:Get Calendar instance by specifying the required timezone.
Step2:From the calendar instance fetch the time value
Source Code:

Result:

Another approach to get convert date time is
-->Get date time of your current timezone in milliseconds then subtract the raw offset of your current timezone and then you will get GMT/UTC time.To GMT/UTC time add the offset of the required timezone.
The timezone conversion is necessary when Maximo server will be there in one timezone and your External system/Middle ware will be there in another time zone and you want update the date according to timezone of external system.
Lets see automation script approach to get time of different time zone.
Step1:Get Calendar instance by specifying the required timezone.
Step2:From the calendar instance fetch the time value
Source Code:
Result:
Another approach to get convert date time is
-->Get date time of your current timezone in milliseconds then subtract the raw offset of your current timezone and then you will get GMT/UTC time.To GMT/UTC time add the offset of the required timezone.
The timezone conversion is necessary when Maximo server will be there in one timezone and your External system/Middle ware will be there in another time zone and you want update the date according to timezone of external system.
Comments
Post a Comment