Describe the bug
With migration of message log methods out of Server Service to new MessageLog Service, the dependent utc_localize_time method was left in Server Service when it should have been migrated to new MessageLog Service
To Reproduce
from TM1py import TM1Service
from datetime import date, datetime
tm1params = {...}
with TM1Service(**tm1params) as tm1:
date_min = datetime.combine(date.today(), datetime.min.time())
tm1.message_logs.get_entries(since=date_min, top=1)
Expected behavior
return top message with since filter of midnight of current day
Version
TM1py 2.0
TM1 Server Version: 11.8.01
Additional context
Will submit PR shortly with fix. This can be bypassed by including timezone info in the datetime object as in example below (using UTC, but user should use whatever timezone their TM1 server is localized to.
from TM1py import TM1Service
from datetime import date, datetime
import pytz
tm1params = {...}
with TM1Service(**tm1params) as tm1:
date_min = datetime.combine(date.today(), datetime.min.time(), pytz.UTC)
tm1.message_logs.get_entries(since=date_min, top=1)
example specifying a timezone e.g. US/Eastern
from TM1py import TM1Service
from datetime import date, datetime
import pytz
tm1params = {...}
with TM1Service(**tm1params) as tm1:
date_min = datetime.combine(date.today(), datetime.min.time(), pytz.timezone('US/Eastern'))
tm1.message_logs.get_entries(since=date_min, top=1)
Describe the bug With migration of message log methods out of Server Service to new MessageLog Service, the dependent utc_localize_time method was left in Server Service when it should have been migrated to new MessageLog Service
To Reproduce
Expected behavior return top message with since filter of midnight of current day
Version TM1py 2.0 TM1 Server Version: 11.8.01
Additional context Will submit PR shortly with fix. This can be bypassed by including timezone info in the datetime object as in example below (using UTC, but user should use whatever timezone their TM1 server is localized to.
example specifying a timezone e.g. US/Eastern