This section describes functions that are used to perform conversions between different types.
The following functions for Type Conversion described here are:
Converts a bytearray to a big integer (two complement).
...
Parameter | Description |
---|
dateVar | Date identifier to set |
stringValue | Date value |
format | If no format string is specified, the default system format is used as specified in $MZ_HOME/common/config/cell/default/master/cell.conf , the mz.server.dateformat property. The date formatting is based on standard Java syntax. For further information, see https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/text/SimpleDateFormat.html. Note |
---|
| Even though the syntax conforms to SimpleDateFormat , it is not directly based on this class. You can enable date format handling based on the SimpleDateFormat class in the installed Java version by setting the Execution Context property mz.use.drdateformat to false. This enables use of additional patterns that are available in the installed Java version. Code Block |
---|
$ mzsh topo set topo://container:<container>/pico:<pico name>/val:config.properties.mz.use.drdateformat false |
When mz.use.drdateformat is set to true (default), the function does not apply the timezone offset at conversion. The timezone can be specified but the date is not modified.
|
Note |
---|
| Unlike SimpleDateFormat the strToDate function does not accept the Locale parameter and uses the default JVM locale instead, which may result in parsing errors. If this is an issue, it can be solved by setting the locale to US_en in the JVM arguments of the relevant EC/ECSA. Code Block |
---|
$ mzsh topo set topo://container:<container>/pico:<pico name>/obj:config.jvmargs \
'usercountry: ["-Duser.country=US"]
userlanguage: ["-Duser.language=en"]' |
|
|
timeZone | An optional string stating the time zone to set. It is recommended that you specify the time zone id using the long format, e g "America/St_Johns". It is possible to also use the abbreviated format, e g "PST". However, this can lead to ambiguous results and should be avoided. If an invalid time zone format is entered, no error is returned. Instead, the time zone is automatically set to "GMT". If the time zone is specified in the stringValue , it overrides the timeZone parameter. |
Returns | true or false .
|
...