Think about Loose Coupling | |
PerlMonks |
Re: date and time using localtimeby thanos1983 (Parson) |
on Oct 09, 2017 at 09:06 UTC ( [id://1200976]=note: print w/replies, xml ) | Need Help?? |
Hello sreek3502, Welcome to the Monastery. Fellow monks have answered your question, but I wanted to add my favorite formatting date module Date::Manip. I discovered the module fairly recent but I was blast by the capabilities. It may look a bit complicated at the beginning but more you experiment easier it becomes. Having said that, I think you are looking for something like that?
You can modify the output of the date by using any of the POSIX::strftime::GNU/FORMAT parameters. Or an alternative to simplify it even more is to use the POSIX::strftime::GNU. Check out also the POSIX::strftime::GNU/FORMAT on how to play around with the stdout format based on your desire. Sample of code:
Depending on what you want to do, and what is easier for you to create / maintain you can choose to apply. I hope this helps, BR.
Seeking for Perl wisdom...on the process of learning...not there...yet!
In Section
Seekers of Perl Wisdom
|
|