Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6048861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:30:39+00:00 2026-05-23T07:30:39+00:00

OK, very bizarre issue here, can’t seem to find much on it searching through

  • 0

OK, very bizarre issue here, can’t seem to find much on it searching through here or in google.

I have a bot running on an IRC channel. Initially, I run it from my home PC (Windows) and it worked with no issues.
Now I have moved it to a VPS (Linux) and find that it’s not reporting dates correctly.

The VPS has the date set correctly:

bot@vps:~/bot$ date
Fri Jun 24 13:05:23 WST 2011

The bot has two time functions, one simply returns the time and one is a reminder system.
Both use System.currentTimeMillis(). Both report the time wrong;

[13:10:00] ( mynick) !time
[13:10:00] ( botnick) mynick: The time is now Thu Jun 23 21:10:00
                 GMT-08:00 2011

or:

[13:20:19] ( mynick) remind me in 1 minute test
[13:20:19] ( botnick) bmynick: Okay, I'll remind you about that on Thu Jun
                 23 21:21:19 GMT-08:00 2011

So it seems it’s finding the system time as GMT-8, but I have no idea why? Any suggestions?

Edit: Forced the Java time zone and it now reports correctly, so it seems to be something to do with the JVM

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:30:40+00:00Added an answer on May 23, 2026 at 7:30 am

    The problem here is that the JVM is not successfully detecting your system timezone.

    I have heard a little about this before, but thought they were all fixed. What java version are you using. There is a detailed explanation of this problem here.

    To manually set the timezone you can try these options:

    1. Export TZ variable: export TZ=”US/Eastern”
    2. TimeZone.setDefault(TimeZone.getTimeZone(“US/Eastern”))
    3. java -Duser.timezone=US/Eastern CLASS_NAME
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a bizarre and very infrequent issue where people can't log off the
I have been using Hibernate very successfully, but today I noticed a bizarre phenomenon
ASP.NET newbie here I have coded up an ASP.NET website and running on win'08
Very simply put: I have a class that consists mostly of static public members,
Very simply put, I have the following code snippet: FILE* test = fopen(C:\\core.u, w);
Very often when working on an ASP.NET web site, the options View Code and
Very simple question, is there any cloud server enviroments avaliable these days for us
Very basic question: how do I write a short literal in C++? I know
Very simply, what is tail-call optimization? More specifically, what are some small code snippets
Very odd problem as this is working perfectly on our old Classic ASP site.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.