×
Namespaces

Variants
Actions

S60 Platform services return timestamps as localised strings (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): S60 5th Edition
S60 3rd Edition, FP2
CompatibilityArticle
Keywords: Calendar API
Created: User:Kbwiki (23 Mar 2014)
Last edited: hamishwillee (10 Oct 2012)

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.

This page was last modified on 10 October 2012, at 05:41.
45 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×