php 5.2.17 date('T') gives incorrect timezone. Server time+phpinfo time are correct - timezone

I am having a bit of a weird issue:
the date function gives timezone=MST
the date function from the centOS prompt gives me EST
the phpinfo() function returns America/New_York
As Plesk was showing America/New_York but centOS was not, Techsupport did something to the
/usr/share/zoneinfo/ files, because they said that somehow the New_York file was showing MST (Mountain Time).
After that operation, centOS time and phpinfo() display EST correctly but the date function still display MST.
Any ideas?

Did you tried date_default_timezone_set()?
Since PHP 5.1.0 (when the date/time functions were rewritten), every call to a date/time function will generate a E_NOTICE if the timezone isn't valid, and/or a E_WARNING message if using the system settings or the TZ environment variable.

Related

Windowing and Watermark in Apache beam : Google dataflow

I have a fixed window of 1 minute. I am considering event time.
beam.WindowInto(window.FixedWindows(300))
When I deploy this code ,is the window created instantly even if I have not published any message .suppose I deployed at 6:30 , is it like the windows are automatically created as 6:30 to 6:35, 6:35 to 6:40 and so on ?
If I publish a message to topic having
event timestamp = 6:31 (unix seconds i.e 10,176589653)
when system time = 6:36
..does it mean the watermark for that specific message is at 6:31 and it will miss the window as system time is at 6:36 and allowed lateness=0 and will be rejected.
Windows are always created using UNIX time 0 as a base, meaning, no matter if you start the pipeline at 6:31, 6:32 or 6:35, the windows would always be [6:30, 6:35), [6:35, 6:40).... Note that this also applies for days, the windows would start at 00:00 UTC.
If you want to change this, there's an offset parameter.

Oracle Report stuck in post processing when trying to generate a report

I am creating a Oracle Report. The report is supposed to take a bunch of input and create the report. It is not working for some specific cases.
The input are as follows
1. Account number
2.org id
3. start _date
4.end date
the report is supposed to generate a report for the org_id(constant) based on the account number and for date between start date and end date.
When the account_number is not provided it will return all the information regarding all accounts.
It works when I give specific account information
It works for specific dates (10-jan-25th jan ,20thjan-31st-jan) with out any account number: i.e. it returns information about all account number for given time period.
but it fails to give me information about 10-jan-31st jan. Which I can not figure out why.
I have tried to get the xml and put it in the template and create a preview,
the preview does not work and gives me the following error:
error: Conf File: C:\Template Builder for Word\config\xdo config.xml Font Dir: C:\Template Builder for Word\fonts Run XDO Start Template: C:\MyFiles\XML_Publisher\lATEST OUTPUT\XXONT_M193_CANCELLED_HOLDS .rtf RTFProcessor setLocale: en-us FOProcessor setData: C:\MyFiles\XML_Publisher\Test\errchk15jan7feb.xml FOProcessor setLocale: en-us
With the longer date range, the XML file might be too big for the output postprocessor. Did you check the size of the XML file?
If this is the problem, you can use our company's Blitz Report, which doesn't have size limitations: https://www.enginatics.com/faq/#how-does-blitz-report-compare-with-oracle-bi-publisher

Unison fails because it cannot set time stamp

Trying to sync from a mac to a linux machine, I get multiple failures with a message of the following type:
100% 00:00 ETAFailed [www/sandbox/my-vue-buefy-project/node_modules/spdy-transport/lib/spdy-transport/protocol/spdy]:
Failed to set modification time of file /users/guerrini/www/sandbox/my-vue-buefy-project/node_modules/spdy-transport/lib/spdy-transport/protocol/.unison.spdy.1db0b477154fc6ddf40346e8e27082da.unison.tmp/constants.js
to 1970-01-01 at 1:00:00 (0.000000):
the time was set to 2018-04-12 at 8:49:57 (1523515797.000000) instead`
It seems that it cannot set the modification time and that it uses the current time instead. But, unfortunately, after this the synchronisation of all the files with the above modification date fails.
Moreover, I have tried to set modification date to the given time by hand with "touch" and it works.

Symfony Default timezone doesn't want to work if changed

At the moment i am trying to make a symfony app, but it gave me an error and couldn't start it's server when using the server:run command. It said that it couldn't run because of the timezone. If I change the timezone in the default php.ini file on a mac, it still gives me the error:
[Symfony\Component\Debug\Exception\ContextErrorException]
Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezo
ne_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone
'UTC' for now, but please set date.timezone to select your timezone.
Can someone help me? I tried a lot, but can't figure this one out.
I want to change the timezone in the php.ini file that is being used by Symfony. But i don't know what i am doing wrong.
you can set it in your AppKernel (app folder):
class AppKernel extends Kernel
{
// the usuals.....
// Add this
public function __construct($environment, $debug) {
date_default_timezone_set('Europe/Warsaw');
parent::__construct($environment, $debug);
}
}

Single Sign-on - PingfFederate - How to set the date?

I noticed when PingFederate(PF) sends the date it is off by a day from my Rails app. It appears that the PF date is the one off by a day. For example in the PF SAML response I get:
<saml:Assertion ID="pEaf1kce93SpAxfIpuohOv6QP-T" IssueInstant="2014-05-03T03:15:20.020Z" Version="2.0" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
and
<saml:Conditions NotBefore="2014-05-03T03:10:20.021Z" NotOnOrAfter="2014-05-03T03:20:20.021Z">
whereas in Rails I get
Time.now = 2014-05-02 20:15:19 -0700
which makes me think that I need to set the date in PF. Note that PF is running on the same computer that the Rails app is running on.
Is there a way to set the date in PF?
The time is off as well. Is there a way in PF to set the time too?
SAML assertions are always in UTC. Which is what PingFed is using. Set your Rails application to use UTC as well.
I don't see why you think that the time is off. Your time from Rails is 2015 and -7. That means in UTC, it's tomorrow at 0315 - when it was issued. PingFed is setting an allowance of +/-5 minutes, so the SP should not accept it before 0310 or after 0320.
Your server and PingFed are correct so far...

Resources