Coldfusion 9 default timezone issue - coldfusion

When I execute getDefault() on a java.util.TimeZone object created from ColdFusion 9 I am getting "Pakistan Time". We are in the eastern timezone and our server (Windows 2003) is reporting proper timezone. Where would ColdFusions JVM be getting this timezone?
TimeZone: Pakistan Time (Asia/Karachi)

try this: http://troymurray.blogspot.com/2007/12/coldfusion-timezone-change.html(deleted)
Content retrieved from Google's cache:
ColdFusion Timezone Change
So I've been working on a component to accept data from whatever and insert it into our Oracle database, no big deal. But, I need to do this with date and times, which gets really sticky with Oracle. I noticed however that my ColdFusion function Now() was returning the wrong time, about 5 hours off, which corresponds to my timezone (-5).
I looked all through the ColdFusion Admin but wasn't able to find anywhere to specify this. I then seem to remember that when I setup this server, and installed ColdFusion on it, that I had the wrong timezone set and somehow that must have been saved. Since ColdFusion relies on Java I needed to change the time zone with the Java Virtual Machine (JVM) that ColdFusion runs. Here is how I did it:
First, find the correct timezone ID for your location. I found mine by going here.
Login to the ColdFusion Admin
Under Server Settings go to Java and JVM
Locate the JVM Arguments textarea
Add a space after the last character, then "-Duser.timezone=" and then your timezone ID.
Click the "Submit Changes" button
Restart the "ColdFusion 8 Application Server" service
Verify your time shows correctly now.

Related

Dynamic setting the timestamp fields in superset dashboards

I'm building few dashboards in Apache superset. All my available timestamp fields are in UTC timezone. (for example fields are, class_start_time & class_end_time).
I want that in the timezone the dashboard is opened all the timestamp fields will be automatically converted.
For example, I'm opening dashboard in Norway , so the UTC data should be converted to CET timezone of Norway.
I have tried to add some value here in Hours offset but its not working.
Can you please guide how we can achieve this.?
Just for reference :
In Kibana dashboards (ELK stack) have feature to automatically convert the timezone into which it is being opened. So I need same thing in Superset.
Normally you would be able to set this with environment variables when you start the program or container. In Apache Superset, this is not possible. There is an ongoing discussion on Github about this issue. One GitHub user posts the problem and workaround, which is far from workable:
Daylight savings causes issues where users have to update datasource
timezone offset for each datasource twice per year.
So the only thing you can do is update the hours offset twice a year. To make matters even worse, if you use Postgresql, this may not even be possible due to a bug as described here.

SharePoint List behaving Weird after migration

Recently we migrated 2013 sites to office 365 using metalogix tool, in one of the site Task list is migrated with all content but the date which is displaying in due date column is one day ahead of the date in source site
Ex: due date is 02/03/2017 in source but in target it is 03/03/2017
are there any teams which faced similar kind of issue??
what might be the fix for this issue??
You have migrated your SP 2013 sites to O365. Your SP 2013 uses your local timezone and O365 uses its timezone. When you migrate SP2013 to O365, it changes the DateTime value(in your local timezone) to O365 timezone. Thats the reason for 1 day ahead.
We're experiencing a similar issue now migrating from a SP 2007 on prem to a SP 2013 on prem. In one list, the dates are "1/01/1900" but the migration fails with Metalogix reporting that "1899-12-31T15:00:00.0000000Z" is an invalid date for those exact fields.
Not sure why at the moment as both servers appear to be set in the same time zone with the same locale.
UPDATE: This is happening on our servers because the SP2007 is set to GMT time whereas the SP2013 is set to UTC time. A default time value in a date/time field entered when the user cannot enter a time component is 12am. So during the migration daylight savings is/isn't taken into account on one of the servers. We've pushed those particular records one day ahead -> when they get migrated they fall back to 01/01/1900 11:00pm -> all we care about is the date so they come across.

Is there a way to force Sitecore to sync MongoDB data with it's SQL database?

I am setting up Sitecore xDB and am trying to test exactly what info gets through the system for authenticated and non-authenticated users. I would like to be able to make a change and see the results quickly in Sitecore. I found the setting to lower session lifetime to 1 minute rather than 20. I have not found a way to just force Sitecore to sync with Mongo on demand or at least within 1-5 minutes rather than, what also appears to be about 20 minutes at the moment. Does it exist or is "rebuilding" the database explained here the only existing process?
See this blog post by Martina Welander for this and more good info about xDB sessions: https://mhwelander.net/2016/08/24/whats-in-a-session-what-exactly-happens-during-a-session-and-how-does-the-xdb-know-who-you-are/
You just need a utility page that calls System.Web.HttpContext.Current.Session.Abandon(). You may also want to redirect the user to a page that doesn't exist.
Update to address comment
My understanding is that once an xDB session has expired, processing should take place quickly. In the Sitecore.Analytics.Processing.Services.config file, the BackgroundService agent is set to run on an interval of 15 seconds by default.
You may just be seeing cached reporting data. Try clearing the cache using the /sitecore/admin/cache.aspx page. You could also decrease the defaultCacheExpiration setting for the reporting cacheProvider in the Sitecore.Analytics.Reporting.config file. The default is 10 minutes.

Coldfusion cfquery realtime cfprogressbar

My function running query, its taking sometime depending on requested data. While query running, I want to show real query loading cfprogressbar & changing status/title while cfprogressbar doing progress. im still searching on google till now no luck all examples showing static time.
I was thinking if i can get real cfquery loading time & i'll pass that value to cfprogressbar. Please advise
coldfusion 11
windows 2012
cfprogressbar
cfquery
Unfortunately you can't show an accurate progress bar. The ColdFusion engine does not run your query, the database server runs your query and for that reason the ColdFusion engine does not know where your db server is at while running the query. You can show a 'spinner' if you want to let your user know that something is going on.

track all Mysql queries in WAMP

I want to track how much time needed for my queries to be executed
I referred to this post but I get only the queries without the time.
It is possible that after using my web application for a wile,using select, update , insert queries (not from console but real web-application execution) I can get a summary like this output generated by SHOW PROFILES; command.
I am working with wamp mysql V5.5.24
Many thanks
Edit: I used triggers to track the update and insert statement following this method
I still have the problem how to track the select query.
any idea please?
This no longer works.
As of July 2013, you need:
general-log=1
general-log-file = "C:\wamp\logs\mysql_general.log"
Are you sure you are not getting execution times in your slow query log?
If you are just looking to optimize your queries (rather than checking the execution time of every single one), you can look at the mysql server status in phpmyadmin (assuming you kept it in your wamp server) as covered here. The full tutorial is paid, but the preview will get you into the server status page where phpmyadmin will point out problem areas for you.
Finaly I used the general log by setup WAMP server like this
[mysqld]
port=3306
long_query_time = 1
slow_query_log = 1
slow_query_log_file = "E:/wamp/logs/slowquery.log"
log = "E:/wamp/logs/genquery.log"
after that I used this tool (trial version) dbForge Studio where I can use a query profiler and I get the complete execution time.