Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Pages: 1 [2] 3 4

Author Topic: Timezone problem  (Read 16823 times)

Zucye

  • Sr. Member
  • ****
  • Karma: 5
  • Posts: 347
    • Simplemente una Mujer
Timezone problem
« Reply #15 on: September 20, 2006, 01:52:27 am »

You are kind of right Smith, about the "learning experience".  I was so confused I got a little frustrated, but it is all good Now!  

Quote from: agentsmith
Try using "l" (lowercase L) instead of "d" in your date string.
Don't suppose it's much help though, since I don't know a lot of PHP.
Example:
Quote
format - date("Y-m-l H:i:s")
Your  suggestion didn't work :( so I will try a few other things tomorrow.  Now is time for "HOUSE" my favority TV show.  That sound like a good topic "What is your favorite TV Show?" :)
Logged
We can always learn from our failures, not so much from obvious success - C. Robinson (W. Disney). :)

Hoang, Nguyen Duc

  • Newbie
  • *
  • Karma: 0
  • Posts: 35
    • http://kent.vnideadesign.com
Timezone problem
« Reply #16 on: September 20, 2006, 03:53:47 am »

Quote
Thanks to keyrocks, KENT, agentsmith and Patric for the suggestions, but I am kind of disappointed on some of you guys.  It took me hours to figure this out…. Never the less, the solution was so easy, I can’t believe you couldn’t help me out.
:D hehe Zucye. Programming is debuging that makes experiences. I can understand how you feel when you solved the problem on your own :D Great Zucye
Logged
A signature is a small piece of text that is attached to your posts.

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Timezone problem
« Reply #17 on: September 20, 2006, 05:52:25 am »

Quote from: Zucye
I found solution for problem #2
Thanks to keyrocks, KENT, agentsmith and Patric for the suggestions, but I am kind of disappointed on some of you guys.  It took me hours to figure this out…. Never the less, the solution was so easy, I can’t believe you couldn’t help me out.
Well... I am sorry that I disappointed you Zucye... I did not really offer any solution at all. I have not worked with this type of snippet as I have not needed it before, and I am too booked up with client work to spend any time trying to figure it out. The good thing is that you are stretching your skills and figuring it out a little at a time... and are willing to share your results with the rest of us. That is a good result in itself, n'est pas? :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • “I'm a self-made man and worships my creator.”
    • p-ahlqvist.com
Timezone problem
« Reply #18 on: September 20, 2006, 09:58:14 am »

Me too, sorry to disappoint you, Z. But I will just cpoy agentsmiths post right off, and state the same things... I mearly try and help where ever I can... Trying to offer help/solutions as I think perhaps would help... I don't know jackshit about PHP. Considering myself to be below newbie in this field...

I'll try and do better next time.
Logged
"It's only dead fish that goes with the flow... "
Updated

Zucye

  • Sr. Member
  • ****
  • Karma: 5
  • Posts: 347
    • Simplemente una Mujer
Timezone problem
« Reply #19 on: September 20, 2006, 01:14:26 pm »

KENT, keyrocks, Patric, I am not upset at you guys, you took the time to give me your suggestions and I understand, we area all busy.

But I am sure "others" knew the solution on a heart beat, but didn't care to share, or at least point me out to the right direction.



Well, any way, I think it would be nice to implement something like this in the formal release of sNews 1.5.  I am confident, I am not the only one with language and time zone issues.  And for those writing the code, should be a piece of cake.
Logged
We can always learn from our failures, not so much from obvious success - C. Robinson (W. Disney). :)

Hoang, Nguyen Duc

  • Newbie
  • *
  • Karma: 0
  • Posts: 35
    • http://kent.vnideadesign.com
Timezone problem
« Reply #20 on: September 20, 2006, 05:31:25 pm »

:) Great community, I love when we can share ideas w/ each other, together solve problems, Does this sound like a team's spirit ?

Don't forget to tell your problems Z. Even if me or any dudes here would have to tear up all our hair to think of the solution :D we would give you at least a suggestion ;)
Logged
A signature is a small piece of text that is attached to your posts.

Hoang, Nguyen Duc

  • Newbie
  • *
  • Karma: 0
  • Posts: 35
    • http://kent.vnideadesign.com
Timezone problem
« Reply #21 on: September 20, 2006, 05:44:43 pm »

Quote from: Zucye
I still have one problem the fist letter on the day and Month don't appear capitalized.  (This Is just note, not that I am expenting much help)
Try this

Code: [Select]
// First character of each word in str capitalized,
// if that character is alphabetic.

$str = 'hello world!';
echo ucwords($str);             // Hello World!

//the first character of str capitalized,
//if that character is alphabetic.
$str = 'hello world!';
echo ucfirst($str);             // Hello world!
Now, If I'm not wrong, all thing to do is apply one of these two functions after you got a right datetime string. ;) Hope this will help
Logged
A signature is a small piece of text that is attached to your posts.

Zucye

  • Sr. Member
  • ****
  • Karma: 5
  • Posts: 347
    • Simplemente una Mujer
Timezone problem
« Reply #22 on: September 20, 2006, 06:57:24 pm »

Quote from: KENT
:) Great community, I love when we can share ideas w/ each other, together solve problems, Does this sound like a team's spirit ?
:) Well, sometimes!! :D

Your solutions was great.  THANKS A LOT!!  Only thing is that it capitalizes the begining of all words, even those I don't want to capitalize, but for now is good enough.  I wil implent it later.  Now I will re-install ( I am having problems with the buttons "B, I Strike, P Break Image Link Include; when creating articles)
Logged
We can always learn from our failures, not so much from obvious success - C. Robinson (W. Disney). :)

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Timezone problem
« Reply #23 on: September 20, 2006, 07:07:17 pm »

Just looking at the script there... perhaps you can change all instances of ucwords to lcwords. Just a hunch. :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Zucye

  • Sr. Member
  • ****
  • Karma: 5
  • Posts: 347
    • Simplemente una Mujer
Timezone problem
« Reply #24 on: September 20, 2006, 07:25:20 pm »

Quote from: keyrocks
Just looking at the script there... perhaps you can change all instances of ucwords to lcwords. Just a hunch. :)
For now this is what I did:
Code: [Select]
Changed:
echo $a_date_format;
To:
echo ucwords($a_date_format);

Also Changed:
$date;
To:
ucwords($date);
I will try lcwords later.  I am starting fresh now.  I changed so many things yesterday.  I am afraid is not longer stable.  Specially beacause when I change the landuage to Frech it displays correctly.
Logged
We can always learn from our failures, not so much from obvious success - C. Robinson (W. Disney). :)

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Timezone problem
« Reply #25 on: September 20, 2006, 07:42:37 pm »

Oh yeahh... forgot that... I'm still looking for my three-towed screwdriver! :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Zucye

  • Sr. Member
  • ****
  • Karma: 5
  • Posts: 347
    • Simplemente una Mujer
Timezone problem
« Reply #26 on: September 20, 2006, 07:42:39 pm »

Quote from: agentsmith
Try using "l" (lowercase L) instead of "d" in your date string.
Don't suppose it's much help though, since I don't know a lot of PHP.
Example:
Quote
format - date("Y-m-l H:i:s")
That didn't work, but We tried!
Logged
We can always learn from our failures, not so much from obvious success - C. Robinson (W. Disney). :)

Zucye

  • Sr. Member
  • ****
  • Karma: 5
  • Posts: 347
    • Simplemente una Mujer
Timezone problem
« Reply #27 on: September 20, 2006, 07:46:26 pm »

Thanks Keyrocks, but as bakercad said, that function does not exist ;)
Quote from: keyrocks
... perhaps you can change all instances of ucwords to lcwords. Just a hunch. :)
Logged
We can always learn from our failures, not so much from obvious success - C. Robinson (W. Disney). :)

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Timezone problem
« Reply #28 on: September 20, 2006, 07:56:30 pm »

Quote from: Zucye
%A %d de %B de %Y - %R
or whatever you want using the %variables
Just a thought, Z: if you've implemented these variables you would probably have to use %A %l de %B de %Y - %R, if/when testing the date format date("Y-m-l H:i:s"). I'm guessing it might not work if the variables don't match the date format. But my guess could well be wrong.
Logged

Zucye

  • Sr. Member
  • ****
  • Karma: 5
  • Posts: 347
    • Simplemente una Mujer
Timezone problem
« Reply #29 on: September 20, 2006, 07:58:27 pm »

I used KENT's Suggestion and it fixes the problem for now.  I changed the date format, now it only shows the day (name) and Month, so it is OK they are all capitalized.

Quote from: bakercad
Zucye, can you show me exactly what you want your date to show as?  I've read through this topic, but I got a bit confused.  I'll see what I can do to help you out.
If you want to see it in Action  Take a look at:
http://www.zucye.net
Date is highlighted in yellow for easy review and testing
In Short I wanted it to look like this:
Miércoles, 20 de Septiembre del 2006
 
Logged
We can always learn from our failures, not so much from obvious success - C. Robinson (W. Disney). :)
Pages: 1 [2] 3 4