- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to pass the output of a function to the UR...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-23-2010 07:04 AM
тАО11-23-2010 07:04 AM
I am facing an issue with passing the function returned value to a "URL=" parameter of web_url function.
I need to pass the output of date.gettime() method in the URL.for this I am using time_t function to return the value.
ex: web_url("abc.js",
"URL=https://www.abc.com/agent/1289226282/xxx"...);
In this how I can replace 1289226282 with the output of time_t funtion.
Thanks,
Naveen
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-23-2010 08:20 AM
тАО11-23-2010 08:20 AM
SolutionYou might use Perl. For example:
# X="URL=https://www.abc.com/agent/1289226282/xxx"
# echo ${X}|perl -MPOSIX -ple 's{\b(\d+)\b}{strftime "%m%d%Y_%H%M%S",localtime($1)}e'
URL=https://www.abc.com/agent/11082010_092442/xxx
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2010 01:11 AM
тАО11-26-2010 01:11 AM
Re: How to pass the output of a function to the URL parameter of web_url function
Thanks for the solution. Here the getTime() method returns the number of milliseconds since midnight of January 1, 1970 to the specified date. Do you have any methods to calculate this and replace it in "URL=" parameter of web_url funtion.
Thanks
Naveen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2010 09:23 AM
тАО11-26-2010 09:23 AM
Re: How to pass the output of a function to the URL parameter of web_url function
> Here the getTime() method returns the number of milliseconds since midnight of January 1, 1970 to the specified date. Do you have any methods to calculate this and replace it in "URL=" parameter of web_url funtion.
So it appears that this is Javascript. A Google search for "javascript strftime" yields many hits, among them:
http://hacks.bluesmoon.info/strftime/index.html#intro_sec
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2010 07:55 AM
тАО11-29-2010 07:55 AM
Re: How to pass the output of a function to the URL parameter of web_url function
Thanks for that. I had been wondering.
(Count on the HP-UX forum for the most
context-free questions, I always say.)