Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
edc58e3e
Commit
edc58e3e
authored
May 5, 2009
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Add dol_now function
parent
93885de1
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/lib/functions.lib.php
+15
-0
15 additions, 0 deletions
htdocs/lib/functions.lib.php
with
15 additions
and
0 deletions
htdocs/lib/functions.lib.php
+
15
−
0
View file @
edc58e3e
...
...
@@ -35,6 +35,21 @@
if
(
!
defined
(
'DOL_DOCUMENT_ROOT'
))
define
(
'DOL_DOCUMENT_ROOT'
,
'..'
);
if
(
!
defined
(
'ADODB_DATE_VERSION'
))
include_once
(
DOL_DOCUMENT_ROOT
.
"/includes/adodbtime/adodb-time.inc.php"
);
/**
* \brief Return date for now
* \param mode 'gmt' => we return GMT timestamp, 'tzref' => we use the company timezone
* \return date Timestamp
*/
function
dol_now
(
$mode
=
'tzref'
)
{
if
(
$mode
==
'gmt'
)
$ret
=
gmmktime
();
else
if
(
$mode
==
'tzref'
)
{
// TODO Should use the timezone of the company instead of timezone of server
$ret
=
mktime
();
}
return
$ret
;
}
/**
* \brief Clean a string to use it as a file name.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment