I'm using the CodeIgniter calendar class to generate an availability calendar. I use a loop to check if a date is in the "reserved" array, and if it is, give that cell a class of booked.
For some reason, on my server (Ubuntu 11.04), when the calendar is displayed the booked dates are showing one day earlier than they should. I'm trying to debug this, as the problem does not appear on my local machine and the values in the database are correct. Since it works on my local machine, I think it shouldn't be a code problem, either.
I've verified that the php.ini settings for date.timezone are identical, and the system dates (when you type 'date' in command line) are also identical.
Can anyone give me further insight into how to debug this problem?
I ended up figuring out where my issue was. The timezone on my database server was incorrect (6 hours behind my production server).
Related
In my internal gitlab site there are a lot of repositories and I want to find repositories which don't' have commits for so long .
In order to do this , I searched as last updated but it's not accurately reflect , looks like it's a bug .
That could be similar to gitlab-org/gitlab-foss issue 56227:
For example, I have a project testing-dev-project in a group.
It displays that it was last updated 1 week ago.
Using the inspector, the time is Dec 28, 2018. However, if I query the project with the API, I get the "last_activity_at":"2018-10-26T12:46:34.372-07:00".
You can also check by going to the Project -> Activity or Project -> Settings -> Audit Events.
But:
This has likely always been the behavior - if a database migration touches something in a project then the updated_at timestamp is automatically updated by Rails.
This is also mentioned in gitlab-org/gitlab issue 25862: "Show project creation dates when sorting group page on this attribute"
For some reason, updated_at was updated fairly recently. I suspect a migration such as the one that encrypted the runners token column may have touched every project.
As a result, the updated_at column may have been updated recently, and the projects appear to have been touched more recently than they should.
Last updated being out of order due to the issues described in gitlab-org/gitlab-foss issue 27181
That last issue is the most relevant, still opened, and finishes with:
The discrepancy between the actual sort order and the displayed updated time is due to the fact that it displays the project's last_updated_date value, while sort is based on last_updated_at.
It's not immediately obvious to me why these values are so different, it seems like they should be very close.
I've submitted a MR that sets the list to display values from last_updated_at, though I'm not sure if a better long term solution would be to change the triggers that set last_updated_date and use that for sorting instead.
This issue is moved to gitlab-org/gitlab issue 17017.
See also GitLab 14.10 MR 82488: "Project list: order by real last update"
Is there a way to make the time (local) being used by the web based lotus notes application. I noticed that in notes client that basically it always uses the right time of the local machine so it doesn't confuse the users. Wherever he/she is in the world.
The problem is happening in the web, it uses the server machine time thus confusing the user. For example a user created a new document the time it would display or use in the web is the server machine. How can I use or convert it to local machine or local time zone.
The formula I used is just #Now, I already looked in the internet for solution but I did not find what I need or maybe didn't noticed them so if you have links please share it here and if you know how then do guide me. I saw a solution but it's not efficient, it requires changing the web browser options thus it requires to be set up in every computer. I would like to implement it in codes thus the users would not do anything.
Is there a formula in getting the timezone of the local machine? #GetCurrentTimeZone which still gets the timezone of the server.
I would use Javascript in the browser to detect the local timezone and adjust the time accordingly.
Updated:
Take a look at this blog entry: http://blog.texasswede.com/replace-images-on-web-page-using-jquery/
I would suggest that you do something similar. Put a span around the time (make sure you have the time as GMT/UTC) with a specific class that makes it easy for you to get all the instances of a time you need to change. You want the HTML to look something like this:
<span class="GMTtime">7/8/2014 1:23:45 PM UTC</span>
Then you write some Javascript/jQuery code that will execute after the page is loaded (like in the example linked above). Something like this (not tested):
$(".GMTtime").each( function() {
var gmttime = $(this).html(); // Get GMT time value
var d = new Date(gmttime); // Create date object
// Get local time and remove TZ offset at end
var localtime = d.toString().replace(/GMT.*/g,"");
$(this).html(localtime); // Replace GMT value with local value in HTML
});
I am working on a XPage application which will work on both web and client. There is an action which will adjust the date object to 20 days and store it again in the current document. I got an issue, that the code is working perfectly on web and win-xp OS XPinC. I found that there is an issue with win-7 XPinC. And compare with two different win7 machine for the same document. But working on PC but not in another. Finally concluded with that the issues is due to the current machines datetime settings. But I cannot go and check/change all the pc's datetime format. Please advice how can I handle this.
Thanks in advance.
This has been doing my head in for several days.
Xpages works great in my browser, but the date/time is all screwed up when viewed in LN.
The solution is to go into "File" -> "Preferences" and then "Regional Settings".
Change "Content Language" from "English" to "English (United Kingdom)".
A pet hate of mine is that most computers default to the crazy US way of displaying the date, i.e. month/day/year when the rest of the world uses day/month/year.
I have some InfoPath 2010 forms with custom code that submits information to SharePoint 2010 form-enabled libraries. One of the forms has a date field, chosen by a picker and stored in a Date/Time column in the library. The form had been working fine for months, but one day it just started failing with the following error:
There has been an error while processing the form.
Click OK to resume filling out the form. You may want to check
your form data for errors.
When I click "show error details", it shows error code 5337 and gives a correlation ID.
When I look up the error in the event log, the details are as follows:
Business logic failed due to an exception. (User: XXX\frank, Form
Name: Miscellaneous Form, IP: , Request:
http://intranet//apps/_layouts/FormServer.aspx
XsnLocation=/FormServerTemplates/Miscellaneous
Form.xsn&Source=/apps/SitePages/expenses.aspx&DefaultItemOpen=1,
Form ID: urn:schemas-microsoft-com:office:infopath:
Miscellaneous-Form:-myXSD-2012-05-14T12-19-23,
Type: FormatException,
Exception Message: String was not recognized as a valid DateTime.)
I am at a complete loss to understand how this problem can have arisen. No aspect of the solution was touched between when it was working and when it stopped. The date format on the InfoPath form is the same as the date format in the SharePoint list column. The system locale and regional settings are consistent everywhere and have not been changed. The problem arose after a slew of Windows updates on the 20th of January, so I'm wondering if one of those might have caused the problem.
The next steps I plan to take are to rebuild and redeploy the form to see if that fixes the problems. However this is code I inherited and it's part of a larger solution, so I'm nervous about redeployment in case I break other things. That's why I wanted to ask here if anyone has come across this or a similar problem before and can to point out something obvious that I might have overlooked.
Thanks for taking the trouble to read this. Any advice would be very much appreciated.
I've faced some issues with InfoPath after Windows and/or SharePoint updates, so you should not rule out that as root cause of the problem. I would check for any known issues using the updates's name.
Regarding the DateTime format, is your custom code setting the DateTime value? If the answer is yes, make sure you are using the following format for the date.
infoPathField.SetValue(dateFieldItem.ToString("yyyy-MM-dd"));
One other thing, can you check the SharePoint LOGS and copy the exception stacktrace?
OpenWebmail has been installed and configured well before I came on to my project. I don't know how long this has been happening, but I'm starting to see that the dates are being displayed incorrectly on the inbox list. Instead of MM/DD/YYYY, I am seeing MM/MM/YYYY. I've checked the openwebmail.conf and default/openwebmail.conf files, but don't see anything that jumps out at me as being incorrect. Does anybody have any idea why this could be happening?
date display is controlled on a per-user basis. Check in the user preferences for the Display Preference -> Date format pulldown.
Ask future questions about OpenWebMail on the mailing lists at:
http://openwebmail.acatysmoof.com/archive