Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamp is not a timestamp #8

Open
tomswinkels opened this issue Feb 5, 2019 · 3 comments
Open

Timestamp is not a timestamp #8

tomswinkels opened this issue Feb 5, 2019 · 3 comments

Comments

@tomswinkels
Copy link
Contributor

self.timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")

@dmitryelj
Copy link
Owner

True, will fix it a bit later.

@mjs1987
Copy link

mjs1987 commented Nov 15, 2020

same here, what can i do

@dmitryelj
Copy link
Owner

dmitryelj commented Nov 17, 2020

The timestamp in this format (like "2020-10-17 08:18:37") is coming from multimon-ng, so I keep it the same.

You can convert the string to any other format you like with a simple code as:
d_str = datetime.strptime(self.timestamp, "%Y-%m-%d %H:%M:%S").strftime("%Y-%m-%dT%H:%M:%S")
(it's just an idea, maybe there is more compact way to do this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants