Skip to content

Documentation for timestampInMilliseconds has incorrect format string #69

@aaronkurz

Description

@aaronkurz

Description:
The format string used in the documentation example is incorrect. The correct format should be yyyy-MM-dd HH:mm:ss instead of yyyy-MM-DD HH:MM:SS. The incorrect format causes the timestamp to be interpreted wrongly. For reference on correct formatting and why it is formatted wrongly, see the Microsoft docs. Thus, the provided example timestamp is also wrong (1170131400019 corresponds to Tuesday, January 30, 2007 4:30:00.019 AM).
Relevant section in Documentation:

EXAMPLE 2

time:timestampInMilliseconds('2007-11-30 10:30:19', 'yyyy-MM-DD HH:MM:SS')

Converts 2007-11-30 10:30:19 in yyyy-MM-DD HH:MM:SS format to milliseconds as 1170131400019.

(https://siddhi-io.github.io/siddhi-execution-time/api/5.0.8/#timestampinmilliseconds-function)

Suggested Labels:
documentation, bug

Suggested Assignees:
documentation team, product maintainers

Affected Product Version:
5.0.8 (maybe also older, did not check)

OS, DB, other environment details and versions:

Steps to reproduce:

  1. Refer to the documentation example under EXAMPLE 2.
  2. Note the format string used: yyyy-MM-DD HH:MM:SS.
  3. Verify that the format should be yyyy-MM-dd HH:mm:ss based on Microsoft documentation.

I also tried it locally and with the new string it provides the correct ms timestamp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions