I am creating a workaround to fix the SimpleDateFormat
"clone" class of Codename One (CN1) in my app.
I need to handle the XXX format value to get the ISO time-zone.
How can it be calculated?
(I cannot use the SimpleDateFormat
class bundled with Java, nor other classes from pure Java that have not been cloned in CodenameOne.)
Examples from Oracle are
Z Time zone RFC 822 time zone -0800
X Time zone ISO 8601 time zone -08; -0800; -08:00
(I see that the XXX output could be different in some cases but I do not know what they are. Maybe they corresponds to X, XX, XXX formats)
Android examples are the same. I need to manage formats with X value. Maybe they are X, XX, XXX.
Examples have XXX syntax in fact, like in
HH:mm:ss.SSSXXX
I just need the compatibility with Android from the other available values.
I do not know what's the algorithm to calculate the ISO Time-Zone.
CN1 Calendar class can be used, with some other instructions.