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

When recording log entries, cacti should default to hyphenated date format #3483

Closed
YongBoLiu opened this issue Apr 21, 2020 · 9 comments
Closed
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Milestone

Comments

@YongBoLiu
Copy link
Contributor

Describe the bug

A clear and concise description of what the bug is.
In old cacti (version < 1.0), such as 0.8.6, the data time format in cacti log is m/d/Y h:i:s AM/PM, but after cacti 1.0, the data time format is Y/m/d H:i:s, and if CACTI_DATE_TIME_FORMAT is not defined, the format is Y-m-d H:i:s.

To Reproduce

Steps to reproduce the behavior:

  1. Install cacti 0.8.6, Go to CLog page, check in the date time format of logs.

  2. Upgrade to cacti 1.2.0, Go to CLog page, check in the date time format of logs.

  3. The date time format of log is not in the same.

Expected behavior

A clear and concise description of what you expected to happen.
a, After upgrade, the date time format of log should the same as before.
b, The default format should be the same, no matter whether CACTI_DATE_TIME_FORMAT defined or not.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information)

  • OS: [e.g. iOS]
    RHEL

  • Browser [e.g. chrome, safari]

  • Version [e.g. 22]

Smartphone (please complete the following information)

  • Device: [e.g. iPhone6]

  • OS: [e.g. iOS8.1]

  • Browser [e.g. stock browser, safari]
    Firefox 68

  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

@YongBoLiu YongBoLiu added bug Undesired behaviour unverified Some days we don't have a clue labels Apr 21, 2020
@cigamit
Copy link
Member

cigamit commented Apr 21, 2020

I would imagine a good many things changed since 0.8.6 was released 15 years ago. You should expect that when you upgrade something so old.

As for the other issue when the variable is not set, we will have to look into it.

@ddb4github
Copy link
Contributor

ddb4github commented Apr 21, 2020

I would imagine a good many things changed since 0.8.6 was released 15 years ago. You should expect that when you upgrade something so old.

As for the other issue when the variable is not set, we will have to look into it.

Actually, the default cacti.log date format history more like table below:

Date Object Default Date Format Configurable Start Retied
Graph/Export Y/m/d H:i:s true 0.8.6
cacti.log m/d/Y h:i:s A false 0.8.6 0.8.8h
cacti.log Y-m-d H:i:s false 1.0.0 1.1.7
cacti.log Y/m/d H:i:s true 1.1.8

Sometime, default is Y-m-d H:i:s after 1.1.8 if CACTI_DATE_TIME_FORMAT define fail

@netniV
Copy link
Member

netniV commented Apr 22, 2020

That would be my doing I suspect to bring the time stamp to be something more universal rather than just American format.

@netniV
Copy link
Member

netniV commented Apr 22, 2020

Not sure about the slashes though, I use hyphens normally

@TheWitness
Copy link
Member

I think the 1.0.0 version should be the default.

@TheWitness
Copy link
Member

Not sure when it broke though.

@TheWitness TheWitness removed the unverified Some days we don't have a clue label Apr 23, 2020
@ddb4github
Copy link
Contributor

Update date format history table as above

@TheWitness
Copy link
Member

The third column explains.

TheWitness added a commit that referenced this issue Apr 24, 2020
date time format in Clog is not compatiable with old cacti, and default format is not the same
@TheWitness TheWitness added the resolved A fixed issue label Apr 24, 2020
@TheWitness TheWitness added this to the 1.2.12 milestone Apr 24, 2020
@netniV netniV added the confirmed Bug is confirm by dev team label Apr 26, 2020
@netniV
Copy link
Member

netniV commented Apr 26, 2020

This was originally added as part of #459

@netniV netniV changed the title date time format in Clog is not compatiable with old cacti, and default format is not the same When recording log entries, cacti should default to hyphenated date format May 3, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

5 participants