Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Time Problem

Time Problem
Thread Tools
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Nov 11, 2000, 07:18 AM
 
Hey everyone,

I'm having a slight problem with a CGI C++ script.

I'm trying to get the time/date, and I have a C++ program that will do this, namely:

time_t *test;
tm *ftest;
time(test); ftest = localtime(test);
cout << ftest->tm_hour << ":" << ftest->tm_min << " "
<< ftest->tm_mon+1 << "-" << ftest->tm_mday << "-" << ftest->tm_year+1900;

but now I include this in a CGI script, and I get a 500 error. I put in only up to time(test) and that's not even working. Help!
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:42 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2