S60 Platform services return timestamps as localised strings (Known Issue)
Article Metadata
Tested with
S60 3rd Edition, FP2
Compatibility
Article
Overview
Timestamps from the platform services 1.0 and 2.0 APIs are returned as localised strings. The returned date-time string is formatted according to the phone's language. This will make it difficult to use the timestamp data on the widget side.
Description
If the phone is set to use any other language than English, the timestamps in the platform services 2.0 calendar API will not work. In other PS 1.0 and PS 2.0 APIs that utilise timestamps, the time is returned as a localised string. If the phone is set to use English language, then the localised timestamp can be converted back to a JS Date object, by passing it directly to the Date object constructor.
Solution
If possible, use platform services 1.0 calendar API and write a date string parser for all the locales you are targetting with your application. The same kind of parser is also needed for other timestamps returned by PS 1.0 and PS 2.0 APIs if you want to use them programmatically.


(no comments yet)