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

new date format [rt.cpan.org #99398] #6

Open
oalders opened this issue Nov 5, 2019 · 0 comments
Open

new date format [rt.cpan.org #99398] #6

oalders opened this issue Nov 5, 2019 · 0 comments

Comments

@oalders
Copy link
Member

oalders commented Nov 5, 2019

Migrated from rt.cpan.org#99398 (status was 'new')

Requestors:

From [email protected] on 2014-10-09 16:37:08
:

I know this is an HTTP related module but it seems to be a pretty generic module and I have a recommended block of code to add.

I added this block in routine parse_date in a special copy I made:


    # WMIC (Windows command line) Date output format from `wmic os get lastbootuptime`
    (($yr, $mon, $day, $hr, $min, $sec) =
     /^
       (\d{4})             # year
       (\d\d)              # numerical month
       (\d\d)              # day
       (\d\d)              # Hour
       (\d\d)              # Min
       (\d\d)              # Sec
     /x)

    ||


it may not be a complete change but it recognized the output from the WMIC command available in recent versions of Windows.

I discovered this module when looking for a date conversion and this one was the simple one but "badly named".  this should really not be an HTTP module but that can be another discussion.  I found this module suggested on http://www.perlmonks.org/?node_id=433565 and I posted the above change on that page.

this might be rambling a bit but I am posting this as a "bug" because I have discovered that sometimes bugs in CPAN modules do not get fixed for a long time (if ever) but bug reports sometimes contain solutions to problems.  in one case I found a bug (around 3 years ago now) and reported the problem and my solution and it does not look like the fix has been applied in CPAN.  in another case there was a documentation deficiency reported 6-7 years after the last major change to a module and that recommended change solved my problem even though it had not been applied.

I like this module because it is simple to use and easy to understand the code even with what are relatively complex regex cases - it is small enough that it is easy to copy and customize (like this case) without touching the original code.  other modules of this class seem to be rather complex and hard to understand or use.  and sometimes there are many solutions in CPAN to do something but the best ones are usually the simplest ones.

________________________________

This message is private and confidential. If you have received this message in error, please notify us by replying to this email and then delete it from your system. Thank you for your cooperation. EJ Caimen, Inc.


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

1 participant