In my Asp.Net application when I save or update a record the date is coming as #CreatedAt = N'06-May-2015 02:49:03 下午 only the AM/PM part is coming in chinese while in systems Region and language setting Format is English and Location is Macau S.A.R. The Webapplication also supports Chinese language through Globalization.
Make sure the CurrentCulture property is not being set to zh-CHT (or something equivalent) either in your Web.config or the Page where the record is being saved in code.
Go to IIS -> .NET Globalization and check the culture there. Make sure it is Invariant. Check the below screen shot
Check below in IIS setup
I've burn too much time on that one. I really need help.
We have Joomla 3.2.3 installed on a dedicated server.
Our client ask us to set the timezone to New York.
The timezone is setted from UTC (default from joomla) to America/New_York on php.ini.
In the config section in the administrator panel, we've make sure that the timezone was matching with php.ini.
The problem is that there is an offset of 4 hours only in the administrator panel.
If you save a content publish date to 2014-05-28 02:34:00, in MYSQL and in the frontend, it will show 2014-05-28 11:34:00.
This is a timezone issue for sure, but I can't find where I did wrong. Can anyone help?
Again, what I did so far is:
Set timezone to America/New_York in php.ini
Select New York in "System - Global Configuration - Server"
Check in each user profile to set timezone to default.
MySQL and Frontend display -4hours offset.
Thanks for any help. Very appreciated!
-------- UPDATES -----
Problem is finally solved.
Joomla stores date in GMT / UTC format.
I had to reconverted the timezone to display it correctly.
So the lesson would be : "Do not use the raw data from MySQL DB, some need to be converted before".
Problem is finally solved.
Joomla stores date in GMT / UTC format. I had to reconverted the timezone to display it correctly.
So the lesson would be : "Do not use the raw data from MySQL DB, some need to be converted before".
On my Windows Server 2008 R2 server, I've set the:
"Region and Language" -> "Formats" -> "Danish (Denmark"
When I see the settings here, and when I click the "Additional Settings", it seems correct. However, in my application, it is not set correct. Here my output is still American.
For instance, these two situations I get the problem:
Datetime.ToString() gives 11/4/2012 1:18:38 PM instead of 04/11/2012 13:18:38 .
When I input a double with 50,00 it is ignored and is set to 5000. When using a dot, it works. it should be a decimal
Of course I could all set this in the application specifically, but I wonder why it is set to English as default when I've set the Formats to Danish.
I've also set the following:
Location = "Denmark"
Default Input Language = "Danish"
How do I fix it? :-)
ASP.NET runs under a different user account, so you'll need to copy the regional settings across.
In the Region and Language control panel, on the Administrative tab, you should have a Copy settings... button. This will copy the settings from your account to the welcome screen, system accounts and new user accounts.
Another thing to check would be the <globalization> section in your web.config file - you might be picking up the culture settings from the user's browser.
I have date format in my local machine : (d/M/yyyy h:mm tt) ==> (23/6/2011 4:30 PM)
when i publish my website on IIS server it converts date format to (M/d/yyyy H:mm)
i changed the date and time formats of the server but it's not affected .
i changed the culture of the website to English US time format solved but date not. (M/d/yyyy hh:mm tt)
i changed the culture of the website to English UK date format solved but time not. (d/MM/yyyy H:mm)
what is the solution to make it's format like my local format ???!!!
- Open IIS 7
- Select your website
- Open .NET GLOBALIZATION
- From Culture tab, select required Culture and UI Culture.
- Do iisreset
Go to Control Panel
Click Region and you will see a screen with 3 tabs (Formats, Location and Administrative)
Click Formats and choose the settings you prefer
Click Location and choose the settings you prefer
Click Administrative tab. For "Welcome screen and new user accounts", click copy settings. From the new window, click both checkboxes for 'welcome screen and system accounts' and 'new user accounts' (if you skip this step, you will still see the issue because IIS uses system account)
Approve all changes for Region by clicking Ok on all open windows
Open Command prompt, write iisreset and enter
If you still don't see the changes try logoff and logon
I was having the same problem, I just found a solution, you need to change the key on the server, follow this steps:
Go into Registry Editor (start -> run -> type regedit).
Get into the folder HKEY_USERS -> .DEFAULT -> Control Panel -> International.
Look for the key sShortDate, right click -> Modify...
Change the Value data for d/M/yyyy.
Log off. Then next time you log in, dates should be work as you wanted.
That should do the trick, you can also change the sLongDate.
Try to put this line in the system.web of the web.config, modify the data of culture to your country.
<globalization uiCulture="es-CO" culture="es-CO" enableClientBasedCulture="false" />
Please try the below steps.Its works for me
Check app pool of your application in IIS.
Go to Application pool of your website and change Identity of that pool to local service(because your desired date format you have set is in your local system) in Advance setttings.
Restart your app in IIS
This is based on Nedim answer, but with tweak:
Go to Control Panel
Click Region and you will see a screen with 3 tabs (Formats, Location and Administrative)
Click Formats and choose the settings you prefer
Click Additional settings
Click Date tab
Change Short date to desired format and confirm dialog
Click Location and choose the settings you prefer
Click Administrative tab. For "Welcome screen and new user accounts", click copy settings. From the new window, click both checkboxes for 'welcome screen and system accounts' and 'new user accounts' (if you skip this step, you will still see the issue because IIS uses system account)
Approve all changes for Region by clicking Ok on all open windows
Open Command prompt, write iisreset and enter
If you still don't see the changes try logoff and logon
In my case the default format for my country was wrong and I couldn't pick proper format except choosing someting else with desired format. But there was web.config with globalization set to my local culture which had precedense.
Even after setting application locale it was still picking up the application pool users locale. I had to change the region settings for all users. This screen shot might help...
Change System Locale
Change Region Settings to desired
Change your system short date and log date format as desired.
Check app pool of your application in IIS.
Go to Application pools section of IIS and change Identity of that pool to local system(because your desired date format you have set is in your local system)
Restart your app in IIS
If you have changed you system date format and Clicked on Copy Settings to ALl User accounts and still your new format not getting applied to IIS hosted WebProject.Than you must try to go to APplication Pool Idnetity and Change the User Account and then again try to copy settings to All User accounts. Get reference from here it worked for me
How to Set date and time format in IIS
can anyone help. I have recently moved servers, its IIS7 rather that our previous IIS6 but everything else is the same, i have set the region to the UK and all date formats plus system local .. I mean everything ..
But when a webpage asp.net is running on IIS7 it thinks the dates are another format..
This is really puzzling .. i did manage to fix it by putting in each web.config
<globalization culture="en-GB"/>
but i have to put it in everyone.. I know i can aslo put it in machine.config.
But i don't understand it, my other server works without modifications. I have checked the web.config and the machine.config on my old server and it has none of these additions
Any ideas?
Thanks
Make sure you have also ticked the box in Regional and Language Options (Advanced tab) to say "Apply all settings to the default user profile. The account that .Net runs under will remain as US unless you do this. Reboot.
Been there :)
Check the localization options on the box and see what it is set for--someone probably just selected en-US for the setup and forgot to tell anyone.