Gossamer Forum
Home : Products : Links 2.0 : Customization :

Date Stamp Problem

Quote Reply
Date Stamp Problem
Hi All.

Well, after looking (staring) at this one for the last few days, then pretty much ripping all my code apart... and still not getting this little problem fixed, I thought I'd drop a note here...


Ever since the first of the year I've been having a problem with the date that is posted in the "New" section. It states the following (for yesterday)

Quote:
Sunday, January 16 2100 (60).

Please notice the YEAR.

Any suggestions at to how to fix this little problem? This is the only place that I have a data-stamp showing within all my code, so it's not really a big problem... just a strange one!

As Always, Thanks!

------------------
John B. Abela
Owner, 4CM
www.4cm.com/
support@4cm.com

Presently working on:
www.humbee.com/buzz/

Quote Reply
Re: Date Stamp Problem In reply to
What changes have you made to the date routines in the links.cfg file?

I would recommend copying the default date routines in the original LINKS package, and copy them into your links.cfg file.

Also, it could be a problem with your Local.pm module on your server. If replacing the original date and time routines does not do the trick, then I would recommend contacting your Server Administrator and ask them to upgrade the Local.pm (and other Perl modules for that matter).

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




Quote Reply
Re: Date Stamp Problem In reply to
Find sub long_date in links.cfg... $year should look like this
Code:
$year = $year + 1900;
BTW did you see my earlier post about .htaccess logging? I was mistaken in my first post.


------------------
The Immuatable Order of Modding
-=-=-=-=-=-=-=-
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)
Quote Reply
Re: Date Stamp Problem In reply to
Eliot, oldmoney.

Thanks your suggested have fixed my little problem. Thanks a bunch!

also, oldmoney.. Yes, I did see your post.
Thank you!

JbA

------------------
John B. Abela
Owner, 4CM
www.4cm.com/
support@4cm.com

Presently working on:
www.humbee.com/buzz/

Quote Reply
Re: Date Stamp Problem In reply to
Yokhannan, when you say "date stamp" you mean you have the current date "auto" stamp of a page ? if so what perl command do you use to that ? I have experimente with "date" but couldn't get it work. Thanks a bunch !

------------------
P.Espinoza
Qdice.com
Quote Reply
Re: Date Stamp Problem In reply to
Patricio, Hi.

When you say:
Quote:
you have the current date "auto" stamp of a page ?

I'm not sure what your asking...

Without really understanding what your asking, I'll just take a shot in the dark.

As I'm sure you know, Links has the ability to place dates. For example: what day a link is added; or like the "new" page, associating dates to links. (same method for both example)

Now, I'm not sure if Links will place a date-stamp where every you put a command. Maybe <%date%> or <%currentdate%> ?? I'm sure it's documented in there somewhere, or one of the guys here could confirm that.

Whenever I need the present date added onto any of the pages, I just throw in a cgi script I have. It gives me the ability to define exactly how the date is stamped. It's called using SSI.

But for that fact (but I could be way wrong here) I think you can use SSI to call the date the servers own time clock. Thus, getting around the cgi scipt. (but, if this is possible, it wouldn't be configurable. I think)


Eliot, oldmoney... you guys know CGI, & SSI, a lot better then me... maybe you can help him out on this one!

Later Patricio.

JbA

------------------
John B. Abela
Owner, 4CM
www.4cm.com/
support@4cm.com

Presently working on:
www.humbee.com/buzz/

Quote Reply
Re: Date Stamp Problem In reply to
To dynamically show the date and time, what I would recommend doing is copy the get_date stuff, put it into a separate cgi script, then call that script using SSI.

However, this will not work on the cgi based pages (like add, modify, search, etc.).

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




Quote Reply
Re: Date Stamp Problem In reply to
If you want to the get the date of the last build, use Links internal date functions. If you want the date-- that is, the actual date-- use the enviornment variables that John referred to...

Code:
<!--#config timefmt="%A, %B %e" -->
<!--#echo var="DATE_LOCAL" -->

You can get the configuration parameters at bignosebird.com...

------------------
The Immuatable Order of Modding
-=-=-=-=-=-=-=-
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)
Quote Reply
Re: Date Stamp Problem In reply to
Wow !!! lots of info to process (specially for a rookie, but I'm learning a lot!!)

Good guess Yokhannan... Yes, what I want is to display "today's date on my home page". Sounds like the easiest way to go is using a cgi-script. I'll look one up.

Oldmoney, the code you suggested, I can use that at in my home page to show the last time the site was updated it right ?

Do I just drop it within my html home page ? (links-home page)as is...?

code:
--------------------------------------------------------------------------------

<!--#config timefmt="%A, %B %e" --><!--#echo var="DATE_LOCAL" -->

--------------------------------------------------------------------------------

Thank you again Smile (haven't learn how to do those yellow happy faces everyone uses)

Hey... how did that happened ? how did the face como up... test test Smile Wink Frown

------------------
P.Espinoza
Qdice.com

[This message has been edited by Patricio (edited January 18, 2000).]
Quote Reply
Re: Date Stamp Problem In reply to
Yes.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




Quote Reply
Re: Date Stamp Problem In reply to
Patricio,

The cgi script that oldmoney referanced was one from bignosebird.com (or something like that) While I have used it, I found another one that is a LOT easier to use!

And, while not as configurable as BNB's script, it is pretty configurable.

I have uploaded it for you.

You will need to download it, then change the extension from .txt to .cgi
Then just adjust anything that you want.
The file itself is very well documeneted. So just open the file up, and read the notes!

Also, don't forget to chmod 755 it.

www.humbee.com/temp/today.txt

Let me know if you need further assistance.

JbA

------------------
John B. Abela
Owner, 4CM
www.4cm.com/
support@4cm.com

Presently working on:
www.humbee.com/buzz/



[This message has been edited by Yokhannan (edited January 18, 2000).]
Quote Reply
Re: Date Stamp Problem In reply to
Nice little script.

However, I would edit the following code:

Code:
$year += 1900;

TO THE FOLLOWING:

Code:
$year = $year + 1900;

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




Quote Reply
Re: Date Stamp Problem In reply to
Uh, the code I posted wasn't a script... it basically echos the time/date environment variable. It is a standard feature of Un*x. Just thought you'd like to know...

------------------
The Immuatable Order of Modding
-=-=-=-=-=-=-=-
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)
Quote Reply
Re: Date Stamp Problem In reply to
Yokhannan,
Thank you very much for going above and beyond your call of helping !
I got the script, I'm sure I'll have some questions. I'll play with it in about a week (have to go to the real job Frown )

Thank you again to everyone,
Patricio//

Ps: Eliot the code you mentioned $year +=1900; to $year = $year + 1900; is in reference to oldmoney's code not John's date script right ?
------------------
P.Espinoza
Qdice.com

[This message has been edited by Patricio (edited January 18, 2000).]
Quote Reply
Re: Date Stamp Problem In reply to
P.

The year setting that Eliot is taking about is within the cgi script I sent.

About 18 lines from the bottom there is a line of code that has the following:

$year += 1900;

Just make the change that Eliot suggested and thing will work better! (I don't use the year, so it didn't affect my output.. do I never changed it)

Good suggestion too Eliot!

JbA


------------------
John B. Abela
Owner, 4CM
www.4cm.com/
support@4cm.com

Presently working on:
www.humbee.com/buzz/

Quote Reply
Re: Date Stamp Problem In reply to
UH...It is the ONE that Yokhannan gave you!

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------