I have been demanded to go to the clock on windows 7 then to the "change time zone ..." box
and from the drop down list that will show to you after clicking on the change time zone box , you will see different time zones ,i have to take these field exactly and inter it in the database , is there a way to extract these filed to a file ,, or to extract it to the database quickly
If you really had to do this from PHP, you could capture the output from the Windows command line command tzutil /l. Or, you could read from the Windows registry at the following location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones.
But what would be the point? PHP doesn't use Windows time zones. It uses IANA zones. See the PHP docs and the timezone tag wiki.
Besides, once you put it in a text file or a database, you now just have a snapshot copy of it. When Windows Update rolls out changes, you won't get them.
Related
My problem is the following:
I usually backup files (e.g. pictures) on external harddisc drives and the store them away in safe places. In the meantime also on NAS. But I don't want to have them connected and online all the time, for power and security reasons.
If I'm now looking for an old file (e.g. a special jpg from the holiday in April 2004) I would have to connect a few discs and search them for the needed file.
To overcome this problem I usually create a recursive dir-dump into a textfile for the whole disc after backup.
This way I can search the filename in the text-file.
But there still is a problem if I don't exactly know the file name that I am looking for. I know the Year and month and maybe the camera I was using then, but there must be hundreds of files in this month.
Therefore I would like to create a "dummy"-backup-filesystem with all the filesnames on the harddisc but without the actual data behind it. This way I could click through the folders and see the foldernames and filenames and easily find the respective file.
The question is: How do I create such a filesystem copy with the complete folderstructures but only the filenames and not the data?
I'm working on Linux, Opensuse, but I guess this is not a linux specific question.
In the meantime I found the solution I was looking for:
Virtual Volume View:
http://vvvapp.sourceforge.net/
Works with Linux, MacOS and Windows!
I'm trying to set up calendar events in macOS Sierra's Calendar that repeat every 2,551,440 seconds (which happens to be the synodic period of the Moon). This system uses the ICS specification.
Ultimately, I want a calendar that provides the Moon rise and set times for my location, and it also needs to list the Lunar phase (e.g. Full Moon, New Moon, etc.). I have found plenty of examples on the Internet where people have manually created the events, but that's incredibly tedious (one event per day for years!), and they're based on different time zones (and so are of no use to me).
I have seen from the ICS specifications that the file format itself supports events that recur every x seconds. I exported an event as an ICS file (from Calendar), and then edited the ICS file in a text editor, but I must've got the code wrong, as it didn't re-import into macOS Calendar with the correct repeat interval. Instead, it imported a single event with no repetition. It's also possible that I got the code right, but Calendar discarded it upon import...
Can someone please explain how to go about doing this?
I found the RRULE Generator, but that only supports hourly intervals, not seconds, and so is not precise enough for my needs.
I considered running a bash script to generate the event (which would run as a cron job every 2,551,440 seconds), but that would only give a month's notice. I'd prefer to have it set up indefinitely.
Another option may be to write a script in Python to create individual ICS event files; this would also be tedious...
I understand that this can't be done in Calendar directly; the solution will most likely be manually editing each ICS file to set up the recurrence correctly, and then importing them into Calendar... I just don't know how...
...or is there a calendar application somewhere out there that lets you set up events that recur every x seconds? If so, I could create the event in that, export it and then import it into Calendar...
Thanks in advance for any thoughts.
So, I figured this one out.
Apple Calendar, Google Calendar, and pretty much all calendar applications don't support events that repeat every x seconds. The ICS format itself does, just not the programs.
The Moon is in an inclined orbit, so this is an inappropriate solution for what I wanted anyway.
The US Navy has an API that publishes rise/set and phase data for the Moon. I saved the responses from this page (a JSON file), and did some Python code to extract the required data, and then made a Python script to create the separate .ICS files for each event (one event per Moonrise) (i.e. not one event that repeats every x seconds). I then imported those ICS files into macOS Calendar.
Hope this helps someone else who needs to deal with a similar situation in future...
There is a legacy database ISAM based.Cobol software that uses it doesnt even use transactions etc. It is a small company though ,only 20 people are using these programms most of the time there are no conflicts.(other are workers who dont touch PCs).
Everyday a cobol program exports fixed sized records for several things(stock, invoices,orders,sums ,suppliers ,etc) into a text file..
This text file is imported using an Access macro into a jet database (mdb).Each textfile data has the current month. Every table exists 13 times (Supplier1,Supplier2...) for each month and the other for the current month. So current month table is dropped and rebuilt by the macro. Then the whole database is zipped and uploaded to the webhost provider that runs a script to unzip the database and replace the old file.The asp pages also exist 13 times for each months and display grids with the data. (They are made with frontpage i guess).
Now i should add some extra functionallity but this system is a mess.Is there any other idea to synchronize easier?It is really hard as there are no real primary keys etc..
A few pointers --
If it uses ISAM files then these MUST have a unique key for every record.
You need to specify more information about the platform and COBOL compiler used. I am guessing that this is one of Fujitsu, MicroFOcus or RM COBOL. I don't know about RM but MicroFocus and Fujitsu support ODBC so the COBOL programs sould possiblly create the access DB directly rather than via extract files. (Do not even think of replacing the ISAM files with Access, this will cause deadlocks!).
I have installed Lucid Work Enterprises and notice that its displaying time of UTC zone. But my system timezone is UTC+05:30. so there is always a difference in my database last_modified field value for delta query for indexing (as there is 5:30 Hrs difference in Lucid admin timezone and my database timezone).
I tried to change a setting in start.bat file from
"set MISC_OPTS2=-Duser.language=en -Duser.country=US -Duser.timezone=UTC -Dfile.encoding=UTF-8"
to
"set MISC_OPTS2=-Duser.language=en -Duser.country=US -Duser.timezone=UTC+05:30 -Dfile.encoding=UTF-8"
But it doesn't make any difference.
I am unable to find a way to change timezone setting in Lucid admin area. Even there was no option to select timezone in installation wizard.
Please help me that how i can change this timezone setting for Lucid.
Thanks in advance
I had a similar issue using lucen/solr (without LWE). At solr ther is (also) no way to configure the timezone. Asking an Partner from "Lucid imagination" how to handle time-zones with lucene/solr, i get the answer: change timezone-settings at your J2EE servlet container options.
But as you said:
But it doesn't make any difference.
My workaround is realized by the application, which handles the "time-zone-difference" between lucene- and database timestamp. Not sure, which programming language you are using. PHP for example provides nice build-in functionality for handling dateTime objects and different timezones.
How could you detect when the user has rolled back the system date? The usage situation is to prevent circumventing licensing and the program will need to detect a roll back made that happened when it was not running.
Well, you can use an embedded database in your program with an encrypted system date that gets inserted in every once in a while. If you see that a "newer" date is before some previous date, you can see that somebody changed the system date. It's just an idea.
There isn't going to be a software solution to this that cannot be circumvented somehow.
Assuming you are giving out demo software with a short free period, you can record the install datetime in an encrypted log as #Darioo has suggested. The location of the log file should be somewhere that isn't removed by the uninstaller - but the log should be unobtrusive and small.
If the encrypted log is deleted, the license can auto-expire. If the date is earlier (when the log is decrypted and read) then the license can auto-expire. You may want to consider the edge case of daylight-savings mode - the clock may go back in the autumn/fall by an hour.
If the application is reinstalled, it keeps the old encrypted log where it is and uses that so the same license period continues uninterrupted.
If the encrypted log is deleted, and the software is re-installed then it will have no way to tell the difference between the first install and a re-install so they will circumvent it. However, this will be beyond most users particularly if the encrypted log is well hidden. For example you could hide it as an Alternate Data Stream .
Note: I'll leave my other post unless it gets voted down - in which case I'll remove it as it doesn't seem to be so helpful.
Another idea is to also add some NTP connectivity to get current date from Internet.
I think I prefer #darioo's suggestion of having an encrypted log. Just thought I would add that changes to the System Time are written to the Windows Security Log with EventID 4616. Here's the message:
The system time was changed.
Subject:
Security ID: TheComputer\Me
Account Name: Me
Account Domain: TheComputer
Logon ID: 0x283df
Process Information:
Process ID: 0x12b8
Name: C:\Windows\System32\dllhost.exe
Previous Time: s010-11-15T09:10:32.000000000Z
New Time: 2010-11-15T09:10:32.000000000Z
This event is generated when the system time is changed. It is normal for the Windows
Time Service, which runs with System privilege, to change the system time on a regular
basis. Other system time changes may be indicative of attempts to tamper with the
computer.
Of course, the audit log can be cleared out with appropriate permissions. So it could be circumvented. Also, I'm using Windows 7 - it's also on Windows Server 2008 and there is an equivalent on Windows Server 2003 (http://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=4616).
The advantage of this approach is that you can tell when the time was was changed - what it was previously and what it was changed to. So you can detect a negligible change of an hour or so compared to a change of a year.