0

I am working on a J2ME midlet project. I am using Sun WTK 2.5.2_01. The problem is that the time on the emulator device is UTC but i need it to be my host machines local time. I tried to find a setting in the wtk preferences to no avail.

Is this behaviour normal? can I change it? or how can I work around it?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Lawrence Ward
  • 549
  • 1
  • 5
  • 17

1 Answers1

0

I've had this problem myself for ages and I finally figured out a workaround. WTK has a settings file system.config in its lib directory. From there you should find a property: "com.sun.cldc.util.j2me.TimeZoneImpl.timezone"

It was commented away in my file and here you can set which time zone WTK uses. For me setting it as "GMT+03:00" worked. However, I suspect that the setting needs to be changed every time summer or winter time begins.

NREZ
  • 942
  • 9
  • 13
tjamtjam
  • 16
  • 2
  • the real problem is that the emulator's Calendar class uses UTC timezone by default... as anlternative to depending on the device being in a specific timezone, i use the Calendar class and set the timezone of the Calendar, and so am always able to render the local time(or whichever timezone i want). – Lawrence Ward Feb 27 '14 at 11:30